Sativa Diva
Sativa Diva

Reputation: 333

WooCommerce - Display Price Without Tax on Product Page

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

Answers (1)

Michael Giovanni Pumo
Michael Giovanni Pumo

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

Tax setting

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

Tax creation

Hope that this helps somebody in future.

Thanks, Mikey.

Upvotes: 5

Related Questions