Hello @bggg12 ,
That’s an interesting approach.
By default, WooCommerce keeps it blank for 0% taxed countries. Assing the tax label for these will require some customizations. Here is an example code that you can use under your current theme’s functions.php file or using a snippet plugin –
// Adds tax label for non-taxed countries
add_filter( 'woocommerce_cart_product_subtotal', 'modify_cart_product_subtotal_label', 10, 4 );
function modify_cart_product_subtotal_label( $product_subtotal, $product, $quantity, $cart ) {
// Add your logic here.
// You can use the $cart instead of using the global $woocommerce variable.
if ($cart->get_subtotal_tax() == 0) {
$product_subtotal .= ' <small class="tax_label">excl. VAT</small>';
}
return $product_subtotal;
}
add_filter( 'woocommerce_cart_subtotal', 'modify_cart_subtotal_label', 10, 3 );
function modify_cart_subtotal_label( $cart_subtotal, $compound, $cart ) {
// Add your logic here.
// You can use the $cart instead of using the global $woocommerce variable.
if ($cart->get_subtotal_tax() == 0) {
$cart_subtotal .= ' <small class="tax_label">excl. VAT</small>';
}
return $cart_subtotal;
}
If you need more customization consider taking help from professional developers. You can find our recommended developers here.
Thank you ??