Skip to content
Docs
Get RestroPress

Action

rpress_post_remove_cart_discount

Updated
On this page

Fires after a discount code has been removed from the cart through the remove link.

Runs in rpress_remove_cart_discount() after rpress_unset_cart_discount() has removed the code, and before the redirect to the checkout page.

Parameters#

ParameterTypeDescription
$arg1intDiscount ID taken from the discount_id query argument.

Example#

function my_after_discount_removed( $discount_id ) {
	error_log( 'Removed discount ' . $discount_id );
}
add_action( 'rpress_post_remove_cart_discount', 'my_after_discount_removed' );

Notes#

Only fires for the request-driven removal.

Source#

Fired from:

  • includes/discount-functions.php (line 889), in rpress_remove_cart_discount()

See also#

Was this page helpful?