From b11ed6e3dba2a05369dc89bdd611a029ed5c547c Mon Sep 17 00:00:00 2001 From: Boro Sitnikovski Date: Wed, 27 Sep 2017 16:25:45 +0200 Subject: [PATCH] Fix direct access to props on checkout --- includes/class-wc-cart.php | 1 - includes/class-wc-checkout.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index 41be737f665..bd4cbd14051 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -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' ) ); - } /** diff --git a/includes/class-wc-checkout.php b/includes/class-wc-checkout.php index 8db90a15996..5d2e26c3415 100644 --- a/includes/class-wc-checkout.php +++ b/includes/class-wc-checkout.php @@ -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(