How to Find Product ID in WooCommerce (Beginner’s Guide)

Each product in your WooCommerce store has a unique identity number assigned to it. Knowing how to find these product IDs can help you apply specific settings, manage inventory, configure custom plugins, or troubleshoot issues.

We’ve helped create a lot of eCommerce stores, and there have been times when we needed to use product IDs for better store management. So, we understand how important this information can be for store owners.

In this beginner’s guide, we will show you how to quickly find a product ID in WooCommerce.

Finding product ID in WooCommerce

What Is Product ID in WooCommerce?

WooCommerce stores all your product information in the WordPress database. To keep every entry distinct, it automatically assigns a unique ID number to each product you create. This unique ID is the key identifier that allows WooCommerce to fetch the correct product details, process orders, and manage database relationships efficiently.

While this happens in the background, you will sometimes need to find a product’s ID for specific tasks.

For instance, you may be building a WooCommerce product page and need a product ID to display a specific product.

Similarly, you may use a WooCommerce plugin that requires an ID to display a certain product, show related items, or offer upsells.

Having said that, let’s look at how you can quickly locate a WooCommerce product’s ID:

How to Locate a Product ID in WooCommerce

WooCommerce makes it very easy to find a product ID.

Simply go to the Products » All Products page. You will see a list of the most recent products added to your WooCommerce store.

Move the mouse over a product title, and a line of commands will appear below it. This line also includes the product ID displayed as ‘ID:’ followed by the ID number.

Product ID displayed under product title on the All Products page

For instance, the demo product ID is 81 in the above screenshot.

If your store has only a handful of products, you can scroll down the products page to locate a product and see its ID.

You can also use the search at the top right corner of the products table to quickly look for a product by name.

Find a product by name using product search

This will help you narrow down the list of products displayed.

You can then locate a specific product and move your mouse over to its title to view the product ID.

Search for a product to view its ID

You can also find a product ID by clicking on the ‘Edit’ link.

This will open the ‘Edit Product’ page. Now, if you look at your browser’s address bar, you’ll find the product ID in the URL.

Product ID in browser's address bar

Finding Product ID For a Variation Product in WooCommerce

If the product you are looking for does not have variations, you can use the above methods to find its product ID.

However, if the product you are looking for has variations, each variation is assigned its unique product ID.

For instance, if you sell a T-shirt in three colors, like red, blue, and green, then you will add different colors as a product variation.

Example of a WooCommerce product with variations

If you only need a product ID for a specific variation, here is how you will find it.

Simply locate the product by visiting the Products » All Products page. After that, click on the ‘Edit Product’ link below the product title.

Edit product

On the product edit screen, scroll down to the ‘Product Data’ section.

From here, click ‘Variations,’ and it will show you all product variations with their IDs.

Product variation ID

What is The Difference Between Product SKU and ID?

While both product IDs and SKUs (Stock Keeping Units) are unique identifiers, they serve very different functions. Understanding the distinction is key to effective store management.

Here’s a quick breakdown of the main differences:

Attribute Product ID Product SKU
⚙️Generation Automatically created by WooCommerce for every product. Manually entered by you, the store owner.
🎯Purpose An internal identifier used by the database to fetch product data. An external identifier used to track inventory, manage stock levels, and for barcodes.
🧩Format Always a number (e.g., 81, 152). Can be any combination of letters and numbers (e.g., TSHIRT-RED-SM).
Requirement Mandatory. Every single product in your store has a unique ID. Optional. You only need it if you track inventory for physical products.

If you don’t track inventory in WooCommerce, such as when selling digital downloads or services, your products may not need SKUs.

However, every product will always have a unique, system-generated ID.

Now that you understand the key differences, let’s look at some other common questions people have about managing products in WooCommerce.

Frequently Asked Questions About WooCommerce Product Identifiers

Having helped thousands of users set up their WooCommerce stores, we often hear similar questions about product identifiers. Here are the answers to the most common ones.

Can I change a product ID in WooCommerce?

No, you cannot directly change a product ID. WooCommerce and WordPress automatically assign this permanent number when a product is first created, and it serves as a fixed reference in your site’s database.

If you were to change it, it would break the connections between the product and any associated orders or metadata.

The only way to get a new ID is to delete the product and create a new one, but this is not recommended as all historical data will be lost.

Is the product ID the same for all product variations?

No, each product variation gets its own unique ID. The main “parent” product has its own ID, but each specific variation (like ‘Small’ or ‘Blue’) is also assigned a separate ID.

This allows you to manage inventory, pricing, and other settings for each specific variation independently.

Do I need to use product IDs for my store to work?

You don’t need to know or use the product IDs for your store to function day-to-day, as WooCommerce handles them automatically in the background. However, you will need to find and use these IDs when working with certain plugins, shortcodes, or custom code that require you to target a specific product.

Additional Resources and Next Steps

We hope this article helped you learn how to find product IDs in WooCommerce.

You might find these other guides helpful for managing your online store:

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Similar Posts