update_taxes can safely round all values, as lines would already be rounded if applicable
This commit is contained in:
parent
50ca24e5d9
commit
28ac24d870
|
@ -1427,14 +1427,8 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order {
|
|||
$this->add_item( $item );
|
||||
}
|
||||
|
||||
if ( 'yes' !== get_option( 'woocommerce_tax_round_at_subtotal' ) ) {
|
||||
$this->set_shipping_tax( wc_round_tax_total( array_sum( array_map( 'wc_round_tax_total', $shipping_taxes ) ) ) );
|
||||
$this->set_cart_tax( wc_round_tax_total( array_sum( array_map( 'wc_round_tax_total', $cart_taxes ) ) ) );
|
||||
} else {
|
||||
$this->set_shipping_tax( wc_round_tax_total( array_sum( $shipping_taxes ) ) );
|
||||
$this->set_cart_tax( wc_round_tax_total( array_sum( $cart_taxes ) ) );
|
||||
}
|
||||
|
||||
$this->set_shipping_tax( wc_round_tax_total( array_sum( $shipping_taxes ) ) );
|
||||
$this->set_cart_tax( wc_round_tax_total( array_sum( $cart_taxes ) ) );
|
||||
$this->save();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue