Skip to content
Docs
Get RestroPress

Action

rpress_customer_pre_remove_payment

Updated
On this page

Fires before a payment is removed from a customer.

Fires in RPRESS_Customer::remove_payment() after the payment ID has been removed from the working list, before the payment_ids column is updated. Unlike the attach hooks, the customer object is not passed.

Parameters#

ParameterTypeDescription
$payment_idintThe payment ID.
$customer_idintThe customer ID.

Example#

function my_customer_pre_remove_payment( $payment_id, $customer_id ) {
	error_log( 'Detaching payment ' . $payment_id . ' from customer ' . $customer_id );
}
add_action( 'rpress_customer_pre_remove_payment', 'my_customer_pre_remove_payment', 10, 2 );

Source#

Fired from:

  • includes/class-rpress-customer.php (line 424), in RPRESS_Customer::remove_payment()

See also#

Was this page helpful?