Automattic\WooCommerce\Blocks\Domain\Services

CreateAccount::customer_new_account()publicWC 1.0

Trigger new account email. This is intended as a replacement to WC_Emails::customer_new_account(), with a set password link instead of emailing the new password in email content.

Method of the class: CreateAccount{}

No Hooks.

Return

null. Nothing (null).

Usage

$CreateAccount = new CreateAccount();
$CreateAccount->customer_new_account( $customer_id, $new_customer_data );
$customer_id(int)
The ID of the new customer account.
$new_customer_data(array)
Assoc array of data for the new account.
Default: array()

CreateAccount::customer_new_account() code WC 8.7.0

public function customer_new_account( $customer_id = 0, array $new_customer_data = array() ) {
	$new_account_email = new CustomerNewAccount( $this->package );
	$new_account_email->trigger( $customer_id, $new_customer_data );
}