woocommerce_after_deserializing_(object_type)_from_cache filter-hookWC 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'.

Usage

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(array|object)
The object after being deserialized.
$data(array)
The serialized object data that was retrieved from the cache engine.
$id
-

Changelog

Since 6.8.0 Introduced.

Where the hook is called

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

Where the hook is used in WooCommerce

Usage not found.