woocommerce_after_removing_(object_type)_from_cache
Action triggered by an instance of ObjectCache after an object is (attempted to be) removed from the cache.
Usage
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|string)
- The id of the object being removed.
- $result(true|false)
- True if the object removal succeeded, false otherwise.
Changelog
Since 6.8.0 | Introduced. |
Where the hook is called
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 );