WC_Data::prime_raw_meta_data_cache()
Prime caches for raw meta data. This includes meta_id column as well, which is not included by default in WP meta data.
Метод класса: WC_Data{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$result = WC_Data::prime_raw_meta_data_cache( $raw_meta_data_collection, $cache_group );
- $raw_meta_data_collection(массив) (обязательный)
- Array of objects of { object_id => array( meta_row_1, meta_row_2, ... }.
- $cache_group(строка) (обязательный)
- Name of cache group.
Список изменений
С версии 4.7.0 | Введена. |
Код WC_Data::prime_raw_meta_data_cache() WC Data::prime raw meta data cache WC 9.7.1
public static function prime_raw_meta_data_cache( $raw_meta_data_collection, $cache_group ) { foreach ( $raw_meta_data_collection as $object_id => $raw_meta_data_array ) { $cache_key = self::generate_meta_cache_key( $object_id, $cache_group ); wp_cache_set( $cache_key, $raw_meta_data_array, $cache_group ); } }