Af first, I'm not a programmer. In Woocommerce I need to display both product prices, including tax and excluding tax. Code in price.php

<?php if ( $price_html = $product->get_price_html() ) : ?>

is showing default price we entered as product price (this price is excluding tax). I have a problem with displaying price including tax - I'm using this code I found at stackoverflow:

<?php echo $product->get_price_including_tax(); ?>

But the price this code is showing is without formatting and currency I set in Woocommerce settings. Can you help me with this? How to display price_including_tax with proper formatting and currency? I will use this code in some woocommerce template pages, I'd like to avoid editing functions or classes if possible.

2 Answers 2



 <?php echo woocommerce_price($product->get_price_including_tax()); ?>

woocommerce_price() is deprecated since version 3.0.
You can use wc_price() instead :

<?php echo wc_price($product->get_price_including_tax()); ?>

Not the answer you're looking for? Browse other questions tagged or ask your own question.