Skip to content
Docs
Get RestroPress

Action

rpress_customer_pre_attach_payment

Updated
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#

ParameterTypeDescription
$payment_idintThe payment ID.
$customer_idintThe customer ID.
$customerRPRESS_CustomerThe 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), in RPRESS_Customer::attach_payment()

See also#

Was this page helpful?