Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableDataStore::get_order_data_for_ids_from_cache()privateWC 1.0

Retrieve raw order data from cache for the given a set of IDs.

Method of the class: OrdersTableDataStore{}

No Hooks.

Return

\stdClass[]. Keyed array of objects containing raw order data keyed by the order IDs.

Usage

// private - for code of main (parent) class only
$result = $this->get_order_data_for_ids_from_cache( $ids ): array;
$ids(int[]) (required)
List of order IDs.

OrdersTableDataStore::get_order_data_for_ids_from_cache() code WC 9.6.0

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() ) );
}