woocommerce_after_flushing_(object_type)_cache action-hookWC 6.8.0

Action triggered by an instance of ObjectCache after it flushes all the cached objects.

Usage

add_action( 'woocommerce_after_flushing_(object_type)_cache', 'wp_kama_woocommerce_after_flushing_object_type_cache_action', 10, 2 );

/**
 * Function for `woocommerce_after_flushing_(object_type)_cache` action-hook.
 * 
 * @param ObjectCache $cache_instance The instance of ObjectCache whose 'flush` method has been called.
 * @param CacheEngine $engine         The cache engine in use.
 *
 * @return void
 */
function wp_kama_woocommerce_after_flushing_object_type_cache_action( $cache_instance, $engine ){

	// action...
}
$cache_instance(ObjectCache)
The instance of ObjectCache whose 'flush` method has been called.
$engine(CacheEngine)
The cache engine in use.

Changelog

Since 6.8.0 Introduced.

Where the hook is called

ObjectCache::flush()
woocommerce_after_flushing_(object_type)_cache
woocommerce/src/Caching/ObjectCache.php 323
do_action( "woocommerce_after_flushing_{$this->object_type}_cache", $this, $this->get_cache_engine() );

Where the hook is used in WooCommerce

Usage not found.