Need to add product:retailer_item_id:(SKU) For facebook shop integration

#45096
  • Resolved Danny Santaana
    Rank Math free

    Hi, currently there is no output for the meta tag product:retailer_item_id:
    This is required by facebook to pull the product feed from woocommerce, Is there any way to add this that I’m not seeing? I love the product and would hate to have to go back to Yoast for only this, when the rest of the plugin is working so so well for us.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael Davis
    Rank Math pro

    Hello,

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

    I have submitted this problem to our dev team and we will be getting back to you in a short while to discuss possible workarounds for this limitation.

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello,

    To add retailer item meta tag, please add following filter code in your theme’s functions.php file:

    
    add_action( 'rank_math/head', function() {
        if ( ! is_product() ) {
            return;
        }
        
        global $product;
        echo '<meta property="product:retailer_item_id" content="' . $product->get_sku() . '" />';
    }, 99 );
    

    I hope that helps.

    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 2 replies - 1 through 2 (of 2 total)

The ticket ‘Need to add product:retailer_item_id:(SKU) For facebook shop integration’ is closed to new replies.