Home › Forums › WoodMart support forum › price ttc › Reply To: price ttc
Nicosa
I wanted to put a php code but I didn’t want to break the theme:
function price_excluding_tax_and_tax() {
aggregate $product;
if ( $product->managing_stock() && $product->is_in_stock() ){
$price_excl_tax = wc_get_price_excluding_tax($product); // price without VAT
$price_incl_tax = wc_get_price_including_tax($product); // price with VAT
$tax_amount = $price_incl_tax – $price_excl_tax; // VATamount
?>
<p class=”price-excl”> Price without VAT <?php echo wc_price( $price_excl_tax ); ?></p>
<p class=”tax-price”> VAT <?php echo wc_price( $tax_amount ); ?></p>
<p class=”price-incl”> Price including tax <?php echo wc_price( $price_incl_tax ); ?></p>
<?php
}
else{echo”;}
}
add_filter(‘woocommerce_get_price_html’, ‘price_ht_et_ttc’);