WC_Emails::customer_new_account()publicWC 1.0

Customer new account welcome email.

Method of the class: WC_Emails{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Emails = new WC_Emails();
$WC_Emails->customer_new_account( $customer_id, $new_customer_data, $password_generated );
$customer_id(int) (required)
Customer ID.
$new_customer_data(array)
New customer data.
Default: array()
$password_generated(true|false)
If password is generated.
Default: false

WC_Emails::customer_new_account() code WC 9.4.2

public function customer_new_account( $customer_id, $new_customer_data = array(), $password_generated = false ) {
	if ( ! $customer_id ) {
		return;
	}

	$user_pass = ! empty( $new_customer_data['user_pass'] ) ? $new_customer_data['user_pass'] : '';

	$email = $this->emails['WC_Email_Customer_New_Account'];
	$email->trigger( $customer_id, $user_pass, $password_generated );
}