How to Find a WooCommerce Product ID & Variation ID
Product ID
Definition
A product ID is an identifier used to distinguish a product or product record in a catalog, ecommerce platform, or inventory system. Depending on the system, it may be an internal ID or a standardized code such as a GTIN.
Overview
Product ID in WooCommerce is easy to get: open the WordPress admin, go to Products and hover over a product name to see its ID, or open the product edit screen and check the browser address bar (the post ID appears in the URL). For variable products, edit the product and expand the Product Data → Variations panel; each variation displays its variation ID in the variation row.
What The Product ID Typically Is
A Product ID is the system identifier (the post ID) WordPress and WooCommerce use to distinguish product records in your catalog and database. It is usually assigned automatically by WordPress when a product is created. In some contexts you may also encounter standardized product codes — such as GTINs — but those are separate fields, not the internal product ID.
Why You Need Product IDs In WooCommerce
Use product and variation IDs whenever you must reference a specific record directly. Common uses include shortcodes that call a particular product, deep links to product pages, third‑party apps and plugins that sync inventory or import/export order rows, and troubleshooting order data that stores product IDs rather than SKUs.
How To Find A Product ID (Quick Steps)
Follow these steps to get a product ID quickly from the WordPress/WooCommerce admin:
- Open Products: In WP admin, go to WooCommerce → Products (or Products in the left menu).
- Hover Over A Product: Move your cursor over the product title in the list — the ID is shown in small text near the title or in the browser status bar when hovering the Edit link.
- Open Edit Screen: Click Edit on the product; the product ID is visible in the browser address bar as post=### (or ?post=###&action=edit).
How To Find A Variation ID (Variable Products)
Variation IDs are separate from the parent product ID and are required when you need to reference a specific variation (for example, importing orders, targeting stock changes, or using shortcodes that accept variation parameters).
- Edit The Variable Product: Open the parent product and ensure Product Data is set to Variable Product.
- Open Variations Panel: In Product Data, open the Variations tab and expand a variation row — the variation's ID appears in the variation header or beside the variation name.
- Alternative Check: If you click to edit a single variation, check the browser URL or any developer tools output — the variation ID will be included as a parameter or displayed in the variation block.
Difference Between Product ID And SKU
Product ID is an internal, system-generated identifier (the post ID) used by WooCommerce and WordPress to track product records. An SKU (Stock Keeping Unit) is a merchant-assigned code intended for human-readable inventory management, scanning, or retail systems. SKUs are optional and editable; product IDs are not. Integrations and order records often reference product IDs while inventory systems and picking lists commonly use SKUs.
Common Missing‑ID Troubleshooting
If you can’t find an ID where expected, check these common causes and fixes:
- Not Hovering Correctly: Make sure you hover over the product title itself (and wait briefly); some admin themes or plugins alter the display.
- Screen Customizations: Admin list columns or screens can be modified by plugins or themes. If the ID column was removed, use the Edit screen URL to get the post ID instead.
- Variation Rows Not Expanded: Variation IDs only display after a variation row is expanded. Click the small triangle or the variation header to reveal it.
- Product Not Yet Saved: Draft products may not have a final ID until they are first saved or published — save the product and check again.
- Use A Plugin Or REST API: If the admin UI is blocked, install a simple “Reveal IDs” plugin or fetch products via the REST API to return IDs programmatically.
Practical Example
If a shortcode requires product IDs (for example to display several specific products), use the IDs you found by hovering or from the edit URL. Example: [products ids="123,456,789"] — those numbers are the WooCommerce product IDs, not SKUs or GTINs. For a shortcode or API call targeting a variation, include the variation’s ID where required by the extension or code.
Tips For Reliable ID Use
- Record Both ID And SKU: Keep a reference mapping product ID ↔ SKU in spreadsheets or your WMS so integrations that use either value can be reconciled.
- Use Edit URL For Automation: When scripting or building instructions, pull the post=### parameter from the edit URL — it’s stable and reliable.
- Document Variation IDs: For configurable products, list each variation ID with its attributes (size, color) so picks, returns, and integrations resolve the correct variation.
In short, the Product ID is the internal record identifier WooCommerce uses and you can get it by hovering over products in the Products list or by checking the edit-screen URL; variation IDs appear inside the Variations panel on variable products. Use these IDs for shortcodes, direct links, third‑party syncs, and order troubleshooting, and keep SKUs separate for merchant-facing inventory control.
Sources And Additional Reading (4)
- Products — WooCommerce shortcodes
“Products — WooCommerce shortcodes.” WooCommerce, https://woocommerce.com/document/woocommerce-shortcodes/products/.
- Variable Product
“Variable Product.” WooCommerce, https://docs.woocommerce.com/document/variable-product/.
- Managing Products
“Managing Products.” WooCommerce, https://docs.woocommerce.com/document/managing-products/.
- WP_Post class
“WP_Post class.” WordPress Developer Resources, https://developer.wordpress.org/reference/classes/wp_post/.
More from this term
Looking for a 3PL?
Compare warehouses on Racklify and find the right logistics partner for your business.