Merge branch 'pr/17139'

This commit is contained in:
Mike Jolley 2017-10-27 15:21:12 +01:00
commit 43c77c51b5
1 changed files with 2 additions and 2 deletions

View File

@ -298,7 +298,7 @@ function wc_cart_totals_coupon_html( $coupon ) {
function wc_cart_totals_order_total_html() { function wc_cart_totals_order_total_html() {
$value = '<strong>' . WC()->cart->get_total() . '</strong> '; $value = '<strong>' . WC()->cart->get_total() . '</strong> ';
// If prices are tax inclusive, show taxes here // If prices are tax inclusive, show taxes here.
if ( wc_tax_enabled() && WC()->cart->tax_display_cart == 'incl' ) { if ( wc_tax_enabled() && WC()->cart->tax_display_cart == 'incl' ) {
$tax_string_array = array(); $tax_string_array = array();
@ -306,7 +306,7 @@ function wc_cart_totals_order_total_html() {
foreach ( WC()->cart->get_tax_totals() as $code => $tax ) { foreach ( WC()->cart->get_tax_totals() as $code => $tax ) {
$tax_string_array[] = sprintf( '%s %s', $tax->formatted_amount, $tax->label ); $tax_string_array[] = sprintf( '%s %s', $tax->formatted_amount, $tax->label );
} }
} else { } elseif ( ! 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() ); $tax_string_array[] = sprintf( '%s %s', wc_price( WC()->cart->get_taxes_total( true, true ) ), WC()->countries->tax_or_vat() );
} }