Skip to content
Docs
Get RestroPress

Action

rpress_post_remove_fee

Updated
On this page

Fires after a fee has been removed from the cart session.

Runs inside RPRESS_Fees::remove_fee() only when a fee with the given ID existed and has been unset and saved to the session. It does not fire if the ID is not found.

Parameters#

ParameterTypeDescription
$feesarrayRemaining fees, keyed by fee ID.
$idstringID of the removed fee.

Example#

function my_after_fee_removed( $fees, $id ) {
	error_log( sprintf( 'Fee %s removed, %d fees remain.', $id, count( $fees ) ) );
}
add_action( 'rpress_post_remove_fee', 'my_after_fee_removed', 10, 2 );

Source#

Fired from:

  • includes/class-rpress-fees.php (line 120), in RPRESS_Fees::remove_fee()

See also#

Was this page helpful?