-
With help from other peoples previous support tickets I was able to get from 6 mistakes or problems with the Google messages to only one.
here is the code I use with function.php
/** * Filter to modify schema data. * @brand for products * @param array $entity Snippet Data : * @return array */ add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) { $entity['brand'] = 'yourbrandhere'; $entity['offers']['priceValidUntil'] = '2020-12-31'; $entity['gtin13'] = str_replace('-', '',$entity['gtin']); return $entity; });
Only the one with the gtin13 is not working. And MPN I need also for some products. My woocommerce 3.9.1 has both entities already build in(?).
See here: https://i.ibb.co/Bs06D6C/Screenshot-31-01-20-21-55.jpg
What code would bring both GTIN and MPN into the Schema? Thanks for your help.
- This topic was modified 5 years, 6 months ago by .
- This topic was modified 5 years, 6 months ago by . Reason: solved
- This topic was modified 5 years, 6 months ago by . Reason: Thank you
The ticket ‘Only GTIN or MPN into WooCommerce Richsnippets left’ is closed to new replies.