Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableDataStoreMeta::get_meta_data_for_object_ids_from_cache()privateWC 1.0

Retrieve raw object meta from cache for the given a set of IDs.

Метод класса: OrdersTableDataStoreMeta{}

Хуков нет.

Возвращает

\stdClass[][]. An array, keyed by the object IDs, containing arrays of raw meta data for each object.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->get_meta_data_for_object_ids_from_cache( $object_ids ): array;
$object_ids(int[]) (обязательный)
List of object IDs.

Код OrdersTableDataStoreMeta::get_meta_data_for_object_ids_from_cache() WC 9.7.1

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