Skip to content
Docs
Get RestroPress

Action

rpress_insert_user

Updated
On this page

Fires after a new user has been created during checkout registration.

Runs after the user has been inserted and before the user is logged in. Use it to save extra meta or send a welcome message for accounts created at checkout.

Parameters#

ParameterTypeDescription
$user_idintID of the newly created user.
$user_dataarrayRegistration data (after the rpress_insert_user_data filter).

Example#

function my_after_checkout_user_created( $user_id, $user_data ) {
	update_user_meta( $user_id, 'my_registered_at_checkout', 1 );
}
add_action( 'rpress_insert_user', 'my_after_checkout_user_created', 10, 2 );

Source#

Fired from:

  • includes/process-purchase.php (line 844), in rpress_register_and_login_new_user()

See also#

Was this page helpful?