-
Hello, I have a website “gdktools.gr” where we set prices without vat and then Woocommerce calculates and adds the VAT amount. So, on single product pages, the generated tag product:price:amount displays the price excluding the VAT.
I have found a filter like that to add the meta tag to the page including VAT
add_action( 'rank_math/head', function() {
if ( ! is_product() ) {
return;
}global $product;
echo '<meta property="product:price:amount" content="'.wc_get_price_including_tax( $product ).'" />';
}, 99 );but now, we have this meta tag displayed twice.
So, Is it possible to make the tag displays the price including VAT and keep current Woocommerce configuration, e.g. keep setting prices without vat and WC calculates then ?
Check the following screenshot:
https://snipboard.io/YTWmgJ.jpgurl to reproduce: https://www.gdktools.gr/product/nakayama-pro-nz100-trochilati-gennitria-elaioravdistikon-12v-70a-051350/
Thanks in advance.
The ticket ‘Meta tag “product:price:amount” displays price excluding VAT’ is closed to new replies.