Reputation: 333
I am using WooCommerce & WooShop Theme for Wordpress.
I need to display the Product Price EXCLUDING tax on Single Product Page.
There are 2 functions if I understand correctly:
$_product->get_price()
$_product->get_price_excluding_tax()
and this is Price.php (Under Single Product)
<p itemprop="price" class="price"><?php echo $product->get_price_html(); ?></p>
which leads to
'price_html' => '<span class="price">'.$variation->get_price_html().'</span>',
Any ideas?
THANKS!
Upvotes: 1
Views: 20155
Reputation: 14774
I know this question is old, but here's a go for anyone else looking for an answer to using those functions in the proper way.
I found that when I used $_product->get_price_excluding_tax()
it would return the full price.
However, after adjusting a setting in WooCommerce, it now appears correctly.
You should tick the box the says "Catalog prices defined including tax".
You also need to make sure that you have a tax rule setup in the 'Tax' tab. I setup one for UK VAT at 20%.
Hope that this helps somebody in future.
Thanks, Mikey.
Upvotes: 5