Skip to content
Docs
Get RestroPress

Action

rpress_customer_pre_create

Updated
On this page

Fires before a customer is created.

Fires in RPRESS_Customer::create() after the data has been sanitized and the email validated, immediately before the record is written through the customer database class. Because the database layer updates an existing row when the email already exists, this can fire for a customer that is later updated rather than inserted.

Parameters#

ParameterTypeDescription
$argsarraySanitized customer data such as payment_ids, name and email.

Example#

function my_customer_pre_create( $args ) {
	error_log( 'Creating customer ' . $args['email'] );
}
add_action( 'rpress_customer_pre_create', 'my_customer_pre_create' );

Source#

Fired from:

  • includes/class-rpress-customer.php (line 196), in RPRESS_Customer::create()

See also#

Was this page helpful?