From 605a65ec28eb76b9701eaab21a1db073a513e84c Mon Sep 17 00:00:00 2001 From: Vedanshu Jain Date: Mon, 31 Jul 2023 12:44:47 +0530 Subject: [PATCH] Add to reading order ID when creating new order. --- .../src/Internal/DataStores/Orders/OrdersTableDataStore.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php index 31dcb96d84d..d7784d99895 100644 --- a/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php +++ b/plugins/woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php @@ -2310,8 +2310,10 @@ FROM $order_meta_table $order->apply_changes(); if ( $backfill ) { + self::$reading_order_ids[] = $order->get_id(); $this->maybe_backfill_post_record( $order ); } + $this->clear_caches( $order ); }