Rich Snippet

#16174
  • Resolved Thomas Reinholdt
    Rank Math business

    Dear sirs

    First of all, thanks for a great plugin, thumbs up!

    I have noticed that the offer price is shown as ex. vat in the code, that means we get a mismatch when importing from Google Merchant to Ads from Googe. All our prices is shown as inc. vat. Could you please give some advice?

    Have a great day.
    Best regards
    Thomas

    • This topic was modified 5 years, 2 months ago by Thomas Reinholdt. Reason: Not sure if code was embedded :)
Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Thank you for contacting Rank Math today.

    You can use the following code snippet to customize the product snippet data and assign a new offer price to your products:

    /**
     * Filter to Short-circuit Schema if a 3rd party is interested in generating their own data.
     * Replace $schmea_type with schema name like article, review, etc.
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( "rank_math/snippet/rich_snippet_{$schema_type}", function( $entity ) {
     return $entity;
    });

    Please take a look at this page for more info on this:

    Rank Math Filters for developers

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hi there

    Thanks for reply, though i dont want a custom snippet, only want to show the price inclusive vat instead of ex. vat in the rich snippets. All prices on the pages is incl. vat. According to European law prices has to be stated with incl. vat. You will get warnings from Google and they wont accept offerprices in the merchant importe when there are such a huge difference from the snippet price and the price stated on the website. Your plugin shows the price ex. vat. I have deactived the price in the snippet for now but it is a problem.

    Hello,

    Thank you for the response.

    I have submitted this feedback to our developers and we will get back to you in a short while.

    We appreciate your patience. Thank you.

    Hello Michael

    Thanks, have a great day.

    Hello,

    To show price inc VAT in the schema data, please add below filter code in your theme’s functions.php file:

    
    add_filter( "rank_math/snippet/rich_snippet_product_entity", function( $entity ) {
        global $product;
        $entity['offers']['price'] = wc_get_price_including_tax( $product );
        return $entity;
    });
    
    

    Hope that helps. Thank you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    The schema data on the product page which you added in the Sensitive Data Section is showing 45DKK price, isn’t it right? That’s what I see on your page.

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

The ticket ‘Rich Snippet’ is closed to new replies.