From 78c74848d5782cfdc11471fc3f96a574e57e2629 Mon Sep 17 00:00:00 2001 From: kcppdevelopers Date: Thu, 13 Jul 2023 13:22:24 +0530 Subject: [PATCH] Shipping Zone rule(s) are not triggering properly. PFWMA-299 --- ...ommerce-multi-account-management-admin-paypal-payflow.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/admin/class-paypal-for-woocommerce-multi-account-management-admin-paypal-payflow.php b/admin/class-paypal-for-woocommerce-multi-account-management-admin-paypal-payflow.php index d2b41f7..7dc75b5 100644 --- a/admin/class-paypal-for-woocommerce-multi-account-management-admin-paypal-payflow.php +++ b/admin/class-paypal-for-woocommerce-multi-account-management-admin-paypal-payflow.php @@ -393,7 +393,8 @@ public function angelleye_get_multi_account_by_order_total_latest($gateways, $ga $woo_shipping_zone = wc_get_shipping_zone( reset( $shipping_packages ) ); $zone_id = $woo_shipping_zone->get_id(); if ($zone_id != $mul_shipping_zone) { - $cart_loop_not_pass = $cart_loop_not_pass + 1; + unset($result[$key]); + unset($passed_rules); continue; } } @@ -405,6 +406,8 @@ public function angelleye_get_multi_account_by_order_total_latest($gateways, $ga if (!empty($shipping_class) && $shipping_class != 'all') { if ($product_shipping_class != $shipping_class) { $cart_loop_not_pass = $cart_loop_not_pass + 1; + unset($result[$key]); + unset($passed_rules); continue; } }