Hello,
Thanks for contacting us and sorry for any inconvenience caused.
Rank math takes the product data as set in WooCommerce. We do not add those values separately and instead rely on WooCommerce to provide that information.
If you want to show the price with the tax on product pages, then you’ll have to add the price with the tax on product pages and select the Yes, I will enter prices inclusive of tax option in the WooCommerce > Tax settings.
Hope this helps. Let us know if you need any further assistance.
Dear Jaideep,
thanks for your answer. We are aware how to change the Tax Setting in WooCommerce but we need a solution to take the Price incl. Tax for Snippet und MicroData while this option says (prices are entered without tax by our ERP system) set in WooCommerce.
Looking forward to hearing from you,
best,
Philipp
Hello,
Thanks for getting back. Sorry for the delay and any inconvenience that might have been caused due to that.
Please use the code given below in your theme’s/child theme’s functions.php file and check:
add_filter( "rank_math/snippet/rich_snippet_product_entity", function( $entity ) {
global $product;
$perc = 10; // Replace with the Tax Percentage Value
$entity['offers']['price'] *= (1 + $perc / 100);
$entity['offers']['price'] = number_format((float)$entity['offers']['price'], 2, '.', '');
return $entity;
});
Hope this helps. Let us know if you need any further assistance.
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.