parent
83f60c68ab
commit
d3da954133
|
@ -616,6 +616,10 @@ final class WC_Cart_Totals {
|
|||
|
||||
$this->set_total( 'items_total', array_sum( array_values( wp_list_pluck( $this->items, 'total' ) ) ) );
|
||||
$this->set_total( 'items_total_tax', array_sum( array_values( wp_list_pluck( $this->items, 'total_tax' ) ) ) );
|
||||
|
||||
$this->cart->set_cart_contents_total( $this->get_total( 'items_total' ) );
|
||||
$this->cart->set_cart_contents_tax( array_sum( $this->get_merged_taxes( false, 'items' ) ) );
|
||||
$this->cart->set_cart_contents_taxes( $this->get_merged_taxes( false, 'items' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -755,9 +759,6 @@ final class WC_Cart_Totals {
|
|||
$this->set_total( 'total', round( $this->get_total( 'items_total', true ) + $this->get_total( 'fees_total', true ) + $this->get_total( 'shipping_total', true ) + array_sum( $this->get_merged_taxes( true ) ) ) );
|
||||
|
||||
// Add totals to cart object.
|
||||
$this->cart->set_cart_contents_total( $this->get_total( 'items_total' ) );
|
||||
$this->cart->set_cart_contents_tax( array_sum( $this->get_merged_taxes( false, 'items' ) ) );
|
||||
$this->cart->set_cart_contents_taxes( $this->get_merged_taxes( false, 'items' ) );
|
||||
$this->cart->set_discount_total( $this->get_total( 'discounts_total' ) );
|
||||
$this->cart->set_discount_tax( $this->get_total( 'discounts_tax_total' ) );
|
||||
$this->cart->set_total_tax( array_sum( $this->get_merged_taxes( false ) ) );
|
||||
|
|
Loading…
Reference in New Issue