Action
rpress_customer_pre_attach_payment
On this page
Fires before a payment is attached to a customer.
Fires in RPRESS_Customer::attach_payment() after the payment ID list has been prepared, before the customer's payment_ids column is updated.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$payment_id | int | The payment ID. |
$customer_id | int | The customer ID. |
$customer | RPRESS_Customer | The customer object. |
Example#
function my_customer_pre_attach_payment( $payment_id, $customer_id, $customer ) {
error_log( 'Attaching payment ' . $payment_id . ' to customer ' . $customer_id );
}
add_action( 'rpress_customer_pre_attach_payment', 'my_customer_pre_attach_payment', 10, 3 );
Source#
Fired from:
includes/class-rpress-customer.php(line 381), inRPRESS_Customer::attach_payment()
See also#
Was this page helpful?
