GTIN not appearing in Rich Results Test page

#90364
  • Resolved Martin Thornalley
    Rank Math pro

    I have installed and configured the Product GTIN (EAN, UPC, ISBN) for WooCommerce plugin and added the EAN to the Product which is being displayed on my WooCommerce site – see https://www.redrockgames.co.uk/uno-minecraft/ as an example.

    However, when I test the page in Google’s Rich Results Test page I still get the “No global identifier provided (e.g., gtin, mpn, isbn)” warning.

    I’ve tried various solutions that I’ve found on the forums but none have worked.

    Do I need a filter or should it just work with the latest Rank Math and Product GTIN plugins?

    Thanks.

Viewing 1 replies (of 1 total)
  • Hello,

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

    Please add this filter to pass the EAN field value to GTIN, that should fix your issue.

    
    /**
     * Filter to add Brand Name for Products.
     *
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
        $entity['gtin8'] = get_post_meta(get_the_ID(), 'ean', TRUE);
        return $entity;
    });
    

    Looking forward to helping you. Thank you.

    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 not appearing in Rich Results Test page’ is closed to new replies.