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

Action triggered by an instance of ObjectCache after an object is (attempted to be) removed from the cache.

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

add_action( 'woocommerce_after_removing_(object_type)_from_cache', 'wp_kama_woocommerce_after_removing_object_type_from_cache_action', 10, 2 );

/**
 * Function for `woocommerce_after_removing_(object_type)_from_cache` action-hook.
 * 
 * @param int|string $id     The id of the object being removed.
 * @param bool       $result True if the object removal succeeded, false otherwise.
 *
 * @return void
 */
function wp_kama_woocommerce_after_removing_object_type_from_cache_action( $id, $result ){

	// action...
}
$id(int|строка)
The id of the object being removed.
$result(true|false)
True if the object removal succeeded, false otherwise.

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

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

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

ObjectCache::remove()
woocommerce_after_removing_(object_type)_from_cache
woocommerce/src/Caching/ObjectCache.php 299
do_action( "woocommerce_after_removing_{$this->object_type}_from_cache", $id, $result );

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

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