From d1f3a0e042544bebed8130b8db7f7cfe8f086bb1 Mon Sep 17 00:00:00 2001 From: Vedanshu Jain Date: Fri, 28 Jul 2023 10:24:10 +0530 Subject: [PATCH] Fixup - use correct syntax for removing element. --- .../src/Internal/DataStores/Orders/OrdersTableDataStore.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php index 074d6ce65c9..05fd30da8a8 100644 --- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php +++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php @@ -582,7 +582,7 @@ class OrdersTableDataStore extends \Abstract_WC_Order_Data_Store_CPT implements ); } } - unset( self::$reading_order_ids[ $order->get_id() ] ); + self::$reading_order_ids = array_diff( self::$reading_order_ids, array( $order->get_id() ) ); } /** @@ -1066,7 +1066,6 @@ WHERE if ( $data_sync_enabled && $this->should_sync_order( $order ) && isset( $post_orders[ $order_id ] ) ) { self::$reading_order_ids[] = $order_id; $this->maybe_sync_order( $order, $post_orders[ $order->get_id() ] ); - unset( self::$reading_order_ids[ $order_id ] ); } } }