Skip to content
Docs
Get RestroPress

Action

rpress_customer_post_remove_payment

Updated
On this page

Fires after a payment is removed from a customer.

Fires at the end of RPRESS_Customer::remove_payment(), after the payment_ids update and the stat decrements. The first argument tells whether the update succeeded.

Parameters#

ParameterTypeDescription
$payment_removedboolWhether the payment IDs were updated successfully.
$payment_idintThe payment ID.
$customer_idintThe customer ID.
$customerRPRESS_CustomerThe customer object.

Example#

function my_customer_post_remove_payment( $payment_removed, $payment_id, $customer_id, $customer ) {
	if ( $payment_removed ) {
		delete_post_meta( $payment_id, '_my_customer_id' );
	}
}
add_action( 'rpress_customer_post_remove_payment', 'my_customer_post_remove_payment', 10, 4 );

Source#

Fired from:

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

See also#

Was this page helpful?