Each product added to your WooCommerce store has a unique identity number assigned to it.
Knowing how to find these product IDs is important for customizing your online store effectively. This allows you to apply specific settings, manage inventory, configure custom plugins, or troubleshoot issues.
Over the years, we have created multiple eCommerce stores and have used product IDs for better store management. We understand how important this information can be for store owners.
In this beginner’s guide, we’ll show you how to quickly find a product ID in WooCommerce.
What is Product ID in WooCommerce?
WooCommerce saves all your product data in the WordPress database system.
To make each record unique, it automatically assigns an ID number to each product you add to your WooCommerce store.
This allows WooCommerce to display a product when requested, process orders, and do lots of cool things behind the scenes.
However, sometimes, you may need to find a product’s ID to perform certain 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 needs product IDs to show related products or offer upsells.
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.
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.
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.
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.
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.
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.
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.
What is The Difference Between Product SKU and ID?
SKU stands for Stock Keeping Unit. It is a unique identifier a store owner assigns to a product to keep track of their inventory or stock.
Retailers, wholesalers, and other store owners also use SKUs in product barcodes.
However, unlike product IDs, SKU identifiers are not automatically generated by WooCommerce. A store owner will have to manually add it to WooCommerce products.
If you do not track inventory in WooCommerce, your products may not have SKUs or need them.
For instance, if you sell digital downloads or virtual products, you may not need to keep track of your stock or inventory.
On the other hand, each product in your online store has a unique product ID, which is automatically generated by WooCommerce. Even if you never put in an SKU, each product in your store will have a product ID.
We hope this article helped you learn how to find product IDs in WooCommerce. You may also want to see our tutorial on how to edit WooCommerce pages (without coding) or take a look at our WooCommerce SEO guide.
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.
Oyatogun Oluwaseun Samuel
This is incredibly helpful and a must read for anyone new to wooCommerce and want to streamline their store management, of particular useful tip from this article is using the Products>>All Product’s page and hovering over a product title to quickly see its ID. This save time and it is straightforward, especially if one has large inventory. Thank you for this very nice guide!
Jiří Vaněk
I was used to finding the ID of anything in WordPress by looking in the URL, which can sometimes be complicated. The method of having the ID directly in the product list is great, and since WooCommerce is quite new to me and I’m still learning it, this is a useful tip for when I need to find IDs. Being accustomed to WordPress, I would have looked for it in the URL again, which is possible but unnecessarily complicated and time-consuming.
Ralph
This is nice and fast guide with all important info and no fluff.
I have a question. Can we set custom IDs?
Lets say I want t-shirts to be 1-100 and hoodies 101-200 even if i have only 20 t-shirts and 5 hoodies? Just for my own organization sake.
WPBeginner Support
Not at the moment with WooCommerce.
Admin
Oyatogun Oluwaseun Samuel
for the benefit of those who may want to ask the same question because I notice it has been long you asked this question about setting custom IDs in WooCommerce, and might have gotten around it.
Unfortunately, WooCommerce does not natively support custom product IDs. The product IDs are automatically generated by WordPress and are unique to each product.
However, you can use SKU (Stock Keeping Unit) numbers to achieve a similar organizational structure. SKUs can be customized to fit your needs, such as assigning t-shirts SKUs from 1-100 and hoodies from 101-200. This way, you can maintain your desired organization without altering the default product ID system
A Owadud Bhuiyan
When I was a beginner, I didn’t know the post = 81 was the product ID.
This article is really helpful for the beginner.
WPBeginner Support
Glad our article was helpful
Admin