Standards
This commit is contained in:
parent
dee7a8c8d4
commit
6a7af9897a
|
@ -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,11 +306,9 @@ 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() ) ) {
|
||||||
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() );
|
$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 ) ) {
|
if ( ! empty( $tax_string_array ) ) {
|
||||||
$taxable_address = WC()->customer->get_taxable_address();
|
$taxable_address = WC()->customer->get_taxable_address();
|
||||||
|
|
Loading…
Reference in New Issue