Standards

This commit is contained in:
Mike Jolley 2017-10-27 15:21:03 +01:00
parent dee7a8c8d4
commit 6a7af9897a
1 changed files with 3 additions and 5 deletions

View File

@ -298,7 +298,7 @@ function wc_cart_totals_coupon_html( $coupon ) {
function wc_cart_totals_order_total_html() {
$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' ) {
$tax_string_array = array();
@ -306,10 +306,8 @@ function wc_cart_totals_order_total_html() {
foreach ( WC()->cart->get_tax_totals() as $code => $tax ) {
$tax_string_array[] = sprintf( '%s %s', $tax->formatted_amount, $tax->label );
}
} else {
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() );
}
} 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() );
}
if ( ! empty( $tax_string_array ) ) {