woocommerce_after_deserializing_(object_type)_from_cache хук-фильтрWC 6.8.0

Filters the deserialized object that is retrieved from the cache engine of an instance of ObjectCache and will be returned by 'get'.

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

add_filter( 'woocommerce_after_deserializing_(object_type)_from_cache', 'wp_kama_woocommerce_after_deserializing_object_type_from_cache_filter', 10, 3 );

/**
 * Function for `woocommerce_after_deserializing_(object_type)_from_cache` filter-hook.
 * 
 * @param array|object $object The object after being deserialized.
 * @param array        $data   The serialized object data that was retrieved from the cache engine.
 * @param              $id     
 *
 * @return array|object
 */
function wp_kama_woocommerce_after_deserializing_object_type_from_cache_filter( $object, $data, $id ){

	// filter...
	return $object;
}
$object(массив|объект)
The object after being deserialized.
$data(массив)
The serialized object data that was retrieved from the cache engine.
$id
-

Список изменений

С версии 6.8.0 Введена.

Где вызывается хук

ObjectCache::get()
woocommerce_after_deserializing_(object_type)_from_cache
woocommerce/src/Caching/ObjectCache.php 279
return apply_filters( "woocommerce_after_deserializing_{$this->object_type}_from_cache", $object, $data, $id );

Где используется хук в WooCommerce

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