Viewing 4 replies - 1 through 4 (of 4 total)
  • stroyka

    (@stroykamarketcom)

    Hi!

    I fixed my issue by adding a WordPress filter using the “woocommerce_structured_data_product” filter option. This allows you to add new data to the already generated WooCommerce data.

    Add to function.php your child theme

    /*
     * Missing data WooCommerce
     */
    function custom_woocommerce_structured_data_product ($data) {
    	global $product;
    	
    	$data['gtin13'] = $product->get_meta( '_wpm_gtin_code' );
    	
    	return $data;
    }
    add_filter( 'woocommerce_structured_data_product', 'custom_woocommerce_structured_data_product' );
    Thread Starter nikostar1973

    (@nikostar1973)

    Thanks.
    Now it works fine.
    Regards

    This really should be a main focus of the plugin. I’m annoyed it’s not a core feature.

    I mean so many people are not going to pay 79$ a year for the official WooCom plugin, just to add GTIN to WooCommerce product schema output.

    What a joke.

    Add GTIN schema output to the plugin as a feature!!

    It will garner so many users!

    Plugin Author Emanuela Castorina

    (@kreamweb)

    Hello!
    Inside the version 1.0.6 you can find this feature.
    On setting page you can choose the property name to add to the structured data.
    These are the options:

    • gtin
    • gtin8
    • gtin12
    • gtin13
    • gtin14
    • isbn
    • mpn

    Thanks to @stroykamarketcom for the snippet

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Schema.Org’ is closed to new replies.