From dee7a8c8d4e8d700239e4235582f62f6d82fa069 Mon Sep 17 00:00:00 2001 From: Chris Schrijver Date: Wed, 11 Oct 2017 17:58:43 +0200 Subject: [PATCH] If no tax rate is defined for a specific country it still shows "incl. VAT" at the checkout / cart when tax display is set to "As single total". This will solved that --- includes/wc-cart-functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/wc-cart-functions.php b/includes/wc-cart-functions.php index 66098f722bb..a9ecae3a663 100644 --- a/includes/wc-cart-functions.php +++ b/includes/wc-cart-functions.php @@ -307,7 +307,9 @@ function wc_cart_totals_order_total_html() { $tax_string_array[] = sprintf( '%s %s', $tax->formatted_amount, $tax->label ); } } else { - $tax_string_array[] = sprintf( '%s %s', wc_price( WC()->cart->get_taxes_total( true, true ) ), WC()->countries->tax_or_vat() ); + if( ! empty( WC()->cart->get_tax_totals() ) ) { + $tax_string_array[] = sprintf( '%s %s', wc_price( WC()->cart->get_taxes_total( true, true ) ), WC()->countries->tax_or_vat() ); + } } if ( ! empty( $tax_string_array ) ) {