Action
rpress_customer_post_remove_payment
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#
| Parameter | Type | Description |
|---|---|---|
$payment_removed | bool | Whether the payment IDs were updated successfully. |
$payment_id | int | The payment ID. |
$customer_id | int | The customer ID. |
$customer | RPRESS_Customer | The 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), inRPRESS_Customer::remove_payment()
See also#
Was this page helpful?
