function edit_price_display($price, $instance) {
global $product;
if(is_singular('product')) {
$price = $product->price;
$price_incl_tax = $price + round($price * ( 21 / 100 ), 2);
$price_incl_tax = number_format($price_incl_tax, 2, ",", ".");
$price = number_format($price, 2, ",", ".");
$display_price = '<span class="price">';
$display_price .= '<span class="amount">€ ' . $price_incl_tax .'<small class="woocommerce-price-suffix"> incl BTW</small></span>';
$display_price .= '<br>';
$display_price .= '<span class="amount">€ ' . $price .'<small class="woocommerce-price-suffix"> excl BTW</small></span>';
$display_price .= '</span>';
echo $display_price;
} else {
echo $price;
}
}
add_filter('woocommerce_get_price_html', 'edit_price_display', 10, 2);
Visto en tomjesch