On my WooCommerce shop, I'm showing my prices ex VAT. Now I also want to show the price inc VAT. Therefore, I have set up the following code:
// Add price inc VAT to products loop
function wbgoe_show_price_inc_VAT()
{
global $product;
?>
<span class="price">
<?php echo wc_price(wc_get_price_including_tax($product)) . " <small class='woocommerce-price-suffix'>(" . __('inc. BTW', 'tendotools') . ")</small>"; ?>
</span>
<?php }
add_action('woocommerce_after_shop_loop_item_title', 'wbgoe_show_price_inc_VAT');
// Add price inc VAT to single product
function wbgoe_show_price_inc_VAT_sp()
{
global $product; ?>
<p class="price">
<?php echo wc_price(wc_get_price_including_tax($product)) . " <small class='woocommerce-price-suffix'>(" . __("inc. BTW", "tendotools") . ")</small>"; ?>
</p>
<?php }
add_action('woocommerce_single_product_summary', 'wbgoe_show_price_inc_VAT_sp');
My issue is that for variable products, the price is showing only the lowest price instead of the price variation as well. https://prnt.sc/q526ls
What is the proper code to print the price variation inc VAT?