Merge pull request #16958 from woocommerce/fix/direct-access-to-props
Fix direct access to props on checkout
This commit is contained in:
commit
39baa2c488
|
@ -333,7 +333,6 @@ class WC_Cart extends WC_Legacy_Cart {
|
|||
*/
|
||||
public function get_cart_contents_taxes() {
|
||||
return apply_filters( 'woocommerce_cart_' . __FUNCTION__, $this->get_totals_var( 'cart_contents_taxes' ) );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -469,7 +469,7 @@ class WC_Checkout {
|
|||
* @param WC_Cart $cart
|
||||
*/
|
||||
public function create_order_tax_lines( &$order, $cart ) {
|
||||
foreach ( array_keys( $cart->taxes + $cart->shipping_taxes ) as $tax_rate_id ) {
|
||||
foreach ( array_keys( $cart->get_cart_contents_taxes() + $cart->get_shipping_taxes() ) as $tax_rate_id ) {
|
||||
if ( $tax_rate_id && apply_filters( 'woocommerce_cart_remove_taxes_zero_rate_id', 'zero-rated' ) !== $tax_rate_id ) {
|
||||
$item = new WC_Order_Item_Tax();
|
||||
$item->set_props( array(
|
||||
|
|
Loading…
Reference in New Issue