Annoying problem with Invalid GTIN.
-
Google sear console have noticed me that I have invalid GTIN on my product pages. I understand it’s not necessary to fix but I still want to fix it.
1-2 years ago GSC noticed me about missing GTIN. Then I added a code snippet that solved that problem.
/** Use SKU as gtin8 in structured data
*/
add_filter( ‘woocommerce_structured_data_product’,’add_gtin8′,10,2);
function add_gtin8( $markup, $product ) {
$markup[‘gtin8’] = str_replace(‘-‘, ”,$markup[‘sku’]);
return $markup;
};I don’t know why my GTIN is invalid? Can it be because my SKU is both numbers and letters?
Any idea about how to solve my inavlid GTIN.
The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Annoying problem with Invalid GTIN.’ is closed to new replies.