product:price:amount

#43681
  • Resolved Rich Walker
    Rank Math free
    Content AI Starter

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Rich Walker
    Rank Math free
    Content AI Starter

    Hello,

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

    Thank you.

    Rich Walker
    Rank Math free
    Content AI Starter

    Hello,

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

    Thank you.

    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 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.

    ​​​​​​​

    Rich Walker
    Rank Math free
    Content AI Starter

    Hi Michael

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

    Todd
    Rank Math free

    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.