Action
rpress_customer_pre_add_email
On this page
Fires before an additional email is attached to a customer.
Fires in RPRESS_Customer::add_email() after the address passes validation and the check that it is not owned by another user, before it is saved as additional_email customer meta.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$email | string | The email address. |
$customer_id | int | The customer ID. |
$customer | RPRESS_Customer | The customer object. |
Example#
function my_customer_pre_add_email( $email, $customer_id, $customer ) {
error_log( 'Adding ' . $email . ' to customer ' . $customer_id );
}
add_action( 'rpress_customer_pre_add_email', 'my_customer_pre_add_email', 10, 3 );
Source#
Fired from:
includes/class-rpress-customer.php(line 260), inRPRESS_Customer::add_email()
See also#
Was this page helpful?
