Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

CreateAccount::create_customer_account( string $user_email, string $first_name, string $last_name )

Create a new account for a customer (using a new blocks-specific PHP API).


Description Description

The account is created with a generated username. The customer is sent an email notifying them about the account and containing a link to set their (initial) password.

Intended as a replacement for wc_create_new_customer in WC core.


Parameters Parameters

$user_email

(Required) The email address to use for the new account.

$first_name

(Required) The first name to use for the new account.

$last_name

(Required) The last name to use for the new account.


Top ↑

Return Return

(int) User id if successful


Top ↑

Source Source

File: packages/woocommerce-blocks/src/Domain/Services/CreateAccount.php


			


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.