2

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.

9

Try:

 <?php echo woocommerce_price($product->get_price_including_tax()); ?>
| improve this answer | |

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