Forum Replies Created

Viewing 1 replies (of 1 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' );
Viewing 1 replies (of 1 total)