GTIN Already Exists in Attributes
-
Hi, I have a website where GTIN12 already exists in my product attributes as GTIN12 value. How would I add it so google rich snippets recognizes it? I tried code below but it does not work:
add_filter( ‘rank_math/snippet/rich_snippet_product_entity’, function( $entity ) {
$entity[‘gtin12’] = get_post_meta(get_queried_object_id(), ‘pa_gtin12’, true);
return $entity;
});
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘GTIN Already Exists in Attributes’ is closed to new replies.