Easily find WooCommerce products ID

Remi | July 8, 2013 | in Free

It’s recurrent: you want to easily find WooCommerce products ID. You can use products IDs in shortcodes and yes, that’s true when it comes to find a product ID some of you are lost, so i made this little plugin for you. Basically, the plugin will simply create a new column on the products list page that will show each product ID. Simple but useful!

The author

About the author Remi: Hey! My name is Rémi Corson, i'm a WordPress Expert Developer, i create high level themes and plugins, and i provide free stuff every week on this website!


  1. Pingback: L’Hebdo WordPress n°196 : Thèmes – Sondages – 2014 | WordPress Francophone

  2. Pingback: L’Hebdo WordPress n°196 : Thèmes – Sondages – 2014

  3. vitaminc1985

    Hi Remi,

    Is there anyway to check if a product is onsale or not? My ideas is to get an array of onsale IDs and check if the product ID is in the array. But it not a reaally optimized one.


      1. vitaminc1985

        Hello Remi,

        Thanh you very much for your help. It worked for me. Couldn’t find the function at Function Tab on Woocommerce website as it is located in Classes Tab

  4. collectiveinds

    Hi Remi,

    I have got an error code for line 37 which is preventing me activating the plugin. Could you help me to fix it?

    It says:
    Parse error: syntax error, unexpected T_FUNCTION in /home1/harriet1/public_html/www.cheapwebdesignlondon.com/wp-content/plugins/WooProductID.php on line 37



  5. zemekys

    Is it possible to check, if a submitted order contains a special product_id?

    (To trigger a special email-text;
    hook: ‘woocommerce_email_before_order_table’)

  6. royalprincessko

    Hi! Remi,

    Thank you for this wonderful information. I’m new to wootheme and I have some something related product ID …

    Could you help me out?

    I’m trying to use perfect audience for retargeting. And with that I need to edit the tracking tag code …so here are my questions:

    1) how do I manually input the tracking code . I need to manually insert that before the body tag in every page.

    I did find this woodojo plug in

    WooDojo Custom CSS/HTML

    I need to make sure that it would install tracking code on every page.

    2) I need to find the product id short code

    And in your article I saw this code


    Is that what I need to use?

    I basically need to use woo commerce product id short code in this tracking code from perfect audience

    (function() {
    window._pa = window._pa || {};
    // _pa.orderId = “myOrderId”; // OPTIONAL: attach unique conversion identifier to conversions
    // _pa.revenue = “19.99”; // OPTIONAL: attach dynamic purchase values to conversions
    // _pa.productId = “myProductId”; // OPTIONAL: Include product ID for use with dynamic ads
    var pa = document.createElement(‘script’); pa.type = ‘text/javascript’; pa.async = true;
    pa.src = (‘https:’ == document.location.protocol ? ‘https:’ : ‘http:’) + “//tag.perfectaudience.com/serve/543d99cf14c4cd4b74000039.js”;
    var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(pa, s);

    Could you use your expertise to check for me if I have found the solution? Much appreciated

  7. Pingback: Add WooCommerce Products ID

  8. Pingback: Tilføj WooCommerce Produkt ID - WordPress Hjemmesider & Webløsninger af RocaPress

  9. Pingback: WooCommerce Wochenrückblick #5: Release-Kritik, Upselling & Kaufabbrüche » MarketPress Deutschland

Leave a reply