Automattic\WooCommerce\Internal\DataStores\Orders
OrdersTableDataStore::get_order_data_for_ids_from_cache()
Retrieve raw order data from cache for the given a set of IDs.
Метод класса: OrdersTableDataStore{}
Хуков нет.
Возвращает
\stdClass[]
. Keyed array of objects containing raw order data keyed by the order IDs.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_order_data_for_ids_from_cache( $ids ): array;
- $ids(int[]) (обязательный)
- List of order IDs.
Код OrdersTableDataStore::get_order_data_for_ids_from_cache() OrdersTableDataStore::get order data for ids from cache WC 9.7.1
private function get_order_data_for_ids_from_cache( array $ids ): array { $cache_engine = wc_get_container()->get( WPCacheEngine::class ); return array_filter( $cache_engine->get_cached_objects( $ids, $this->get_cache_group() ) ); }