Your cart is empty!
Empty Cart
apply_filters( 'vikappointments_empty_packages_cart', bool $status, VAPCartPackages $cart )
Fires before the cart gets emptied.
Description
Trigger hook before flushing the cart.
It is still possible to see what kind of items $cart
holds, since the cart is emptied after firing this hook.
Parameters
- $status
-
(bool) True on success, false otherwise.
- $cart
-
(VAPCartPackages) The cart instance.
Example
/**
* Trigger hook before flushing the cart.
*
* @param boolean $status True on success, false otherwise.
* @param mixed $cart The cart instance.
*/
add_filter('vikappointments_empty_packages_cart', function($status, $cart)
{
/**
* @todo do stuff here
*/
return $status;
}, 10, 2);
Changelog
Version | Description |
---|---|
1.2 | Introduced. |
Last Update: 2021-10-06
Helpful?