Skip to content
Docs
Get RestroPress

Action

rpress_empty_cart

Updated
On this page

Fires after the cart has been emptied.

Runs at the end of RPRESS_Cart::empty_cart(), after contents, fees, the resuming-payment value and discounts have been cleared from the session.

Example#

function my_empty_cart() {
	RPRESS()->session->set( 'my_cart_notes', null );
}
add_action( 'rpress_empty_cart', 'my_empty_cart', 10, 0 );

Source#

Fired from:

  • includes/cart/class-rpress-cart.php (line 487), in RPRESS_Cart::empty_cart()

See also#

Was this page helpful?