Merge pull request #16958 from woocommerce/fix/direct-access-to-props

Fix direct access to props on checkout
This commit is contained in:
Claudio Sanches 2017-09-27 11:53:43 -03:00 committed by GitHub
commit 39baa2c488
2 changed files with 1 additions and 2 deletions

View File

@ -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' ) );
}
/**

View File

@ -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(