Website Building » WooCommerce » How Do I Find the Product ID of a Variable in WooCommerce?

How Do I Find the Product ID of a Variable in WooCommerce?

Last updated on October 1, 2022 @ 5:35 pm

If you’re running a WooCommerce store, there are a few occasions where you might need to find the product ID of a variable product. For example, if you’re using a third-party plugin that requires the product ID, or if you need to Target a specific variable product with CSS. Here’s how you can find the product ID of a variable product in WooCommerce:

  1. First, log into your WordPress dashboard and go to Products > All Products. This will show you a list of all the products in your store, including both simple and variable products.
  2. Hover over the title of the variable product that you want to find the ID for, and then click on the Edit link that appears.
  3. On the Edit Product screen, take a look at the URL in your browser’s address bar.

    At the end of the URL, you should see "post_type=product". The number that comes before this is the product ID.

Conclusion:

In conclusion, finding the product ID of a variable product in WooCommerce is simple. All you need to do is edit the product and then look at the URL in your browser’s address bar. The number that comes before "post_type=product", is the product ID.

PRO TIP: If you are unsure about how to find the product ID of a variable in WooCommerce, it is best to consult with a WooCommerce expert. Failing to do so could result in lost data or even worse, an incorrect product ID being assigned to a variable.
Kathy McFarland

Kathy McFarland

Devops woman in trade, tech explorer and problem navigator.