GTIN

#558282
  • Resolved Anonymous
    Rank Math free

    hello I have to add GTIN shortcode in product schema kindly help me

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math support, and sorry for any inconvenience that might have been caused due to that.

    Please refer to this filter if you wish to apply a woocommerce attribute to a schema property:

    add_filter( "rank_math/snippet/rich_snippet_product_entity", function( $entity ) {
    	global $product;
    	$attr_1 = $product->get_attribute( 'YOUR_ATTRIBUTE_1' );
    	$entity['gtin'] = $attr_1;
    	return $entity;
    });

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘GTIN’ is closed to new replies.