Automattic\WooCommerce\Internal\DataStores\Orders
OrdersTableDataStoreMeta::get_meta_data_for_object_ids_from_cache
Retrieve raw object meta from cache for the given a set of IDs.
Method of the class: OrdersTableDataStoreMeta{}
No Hooks.
Returns
\stdClass[][]. An array, keyed by the object IDs, containing arrays of raw meta data for each object.
Usage
// private - for code of main (parent) class only $result = $this->get_meta_data_for_object_ids_from_cache( $object_ids ): array;
- $object_ids(int[]) (required)
- List of object IDs.
OrdersTableDataStoreMeta::get_meta_data_for_object_ids_from_cache() OrdersTableDataStoreMeta::get meta data for object ids from cache code WC 10.3.6
private function get_meta_data_for_object_ids_from_cache( array $object_ids ): array {
$cache_engine = wc_get_container()->get( WPCacheEngine::class );
$meta_data = $cache_engine->get_cached_objects( $object_ids, $this->get_cache_group() );
return array_filter( $meta_data );
}