-
Dear team,
Please provide a snippet for adding MPN and GTIN
In one of your older post i found a snippet but it does not work. The custom attributes that i created in Woocommerce are called MPN and GTIN.<?php
/**
* Filter to add MPN Name for Products.
*
* @param array $entity Snippet Data
* @return array
*/
add_filter( ‘rank_math/snippet/rich_snippet_product_entity’, function( $entity ) {
$entity[‘MPN’][‘@type’] = ‘MPN’;
$entity[‘MPN’][‘name’] = ‘Rank Math’;
return $entity;
});
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The ticket ‘MPN and GTIN snippet’ is closed to new replies.