woocommerce_after_flushing_(object_type)_cache хук-событиеWC 6.8.0

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

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

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.

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

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

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

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

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

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