Automattic\WooCommerce\Database\Migrations\CustomOrderTable
PostsToOrdersMigrationController::maybe_clear_order_datastore_cache_for_ids()
Clear the cache of order data for modified orders during migration if cache is enabled.
Метод класса: PostsToOrdersMigrationController{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->maybe_clear_order_datastore_cache_for_ids( $order_post_ids );
- $order_post_ids(массив) (обязательный)
- List of order IDs of the orders to clear from cache.
Код PostsToOrdersMigrationController::maybe_clear_order_datastore_cache_for_ids() PostsToOrdersMigrationController::maybe clear order datastore cache for ids WC 9.7.1
private function maybe_clear_order_datastore_cache_for_ids( array $order_post_ids ) { if ( OrderUtil::custom_orders_table_datastore_cache_enabled() ) { $orders_table_datastore = wc_get_container()->get( OrdersTableDataStore::class ); if ( is_callable( array( $orders_table_datastore, 'clear_cached_data' ) ) ) { $orders_table_datastore->clear_cached_data( $order_post_ids ); } } }