• marcusterribilis

    (@marcusterribilis)


    WooCommerce does not allow the same GTIN to be used for two different items. The issue is that I sell both new and used items—they have different SKUs and different prices—yet they should share the same GTIN!
    Field “Global Unique Id (WooCommerce)”

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi Marcus,

    WooCommerce has no setting for this, but one line of code switches the check off. You don’t need a developer: install the free Code Snippets plugin, add a new snippet, paste this line and activate it.

    add_filter( 'wc_product_pre_has_global_unique_id', '__return_true' );

    Developers can put the same line in the child theme’s functions.php instead.

    Tested on WooCommerce 11.2.1, the version your store runs: a new and a used product saved with the same GTIN and different SKUs and prices. It applies to the whole store, so WooCommerce won’t warn you anymore if you type a number twice by mistake.

    If you’d rather not add anything, keep the number on the product you’re selling. 30 of your 32 occasion products are sold out, but on 10 pairs the number sits on the used one and the new one in stock shows none. For example CEF Rapa (occasion) has 3760296771394 and CEF Rapa has nothing. Clear it on the used one first, then add it to the new one.

    If these products go to Google Merchant Center, set condition to used on the occasion ones. WooCommerce has no condition field, so it has to come from your feed. Google accepts one GTIN on a new and a used item when the condition differs, see the book example here: https://support.google.com/merchants/answer/6324461

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.