Action
rpress_customer_post_create
On this page
Fires after a customer is created.
Fires at the end of RPRESS_Customer::create(), after the database write has been attempted. The first argument is the customer ID on success and false otherwise, so check it before using it.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$created | int|false | The customer ID if created successfully, otherwise false. |
$args | array | Sanitized customer data such as payment_ids, name and email. |
Example#
function my_customer_post_create( $created, $args ) {
if ( $created ) {
update_option( 'my_last_customer_id', (int) $created );
}
}
add_action( 'rpress_customer_post_create', 'my_customer_post_create', 10, 2 );
Source#
Fired from:
includes/class-rpress-customer.php(line 212), inRPRESS_Customer::create()
See also#
Was this page helpful?
