product:price:amount

  • Rankmath is showing woocommerce price without tax rich snippet. I have added

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

    but this hasn’t worked.

    • This topic was modified 3 months, 3 weeks ago by Rich Walker.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

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

    Thank you.

    Hello,

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

    Thank you.

    Hello,

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

    I can suggest that you use the following code snippet to change this meta value:

    /**
     * Allow developers to change the content of specific social meta tags.
     *
     * The dynamic part of the hook name. $network, is the network slug
     * and $og_property, is the property which we are outputting.
     *
     * @param string $content The content of the property.
     */
    add_filter( "rank_math/opengraph/facebook/product_price_amount", function( $content ) {
        global $product;
        return wc_get_price_including_tax( $product );
    });

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hi Michael

    Thank you, that has fixed the meta property but im still struggling with the rich snippets showing the price without tax.

    Hi Rich,

    For that, you need to make change in your WooCommerce settings:
    null

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

The ticket ‘product:price:amount’ is closed to new replies.