I use woocommerce.
In my product page, I have changed the code in price.php to show both price inclusive and exclusive taxes. But for some products, there is no price and they have to contact us to get the price. So when the price is empty, I don't want to show the text with the prices.
I have combined some code that I found, with the code I already had, but it doesn't really work, I keep getting the "excl. BTW €0,00 incl. BTW" text, even when the price of the product is empty.
<p class="price"><?php if( !empty(woocommerce_price ($product-> get_price_excluding_tax ()))) { echo $product->get_price_html() . ' excl. BTW<br />' . wc_price( wc_get_price_including_tax( $product ) ) . ' incl. BTW'; } ?></p>
Thanks in advance!