Show tax rate on product meta
-
Hi all,
Hi have variable products, and some variations the tax is 23% others is 6%
On product page, on meta product details, I see that the SKU is updated everytime I choose a variation.
Just after the SKU, I would like to add the tax rate of variation selected, and update it once you choose other variation, like it does for SKU
I’m messing around with meta.php, I override it and inserted:
$tax_rates = WC_Tax::get_rates( $product->get_tax_class() ); if (!empty($tax_rates)) { $tax_rate = reset($tax_rates); echo ($tax_rate['rate']); }
But I always get 23, that I assume is the rate of parent product, and I select variations that are 6% rate and this number does not update.
Any idea how can I get this to work?
The page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Show tax rate on product meta’ is closed to new replies.