WordPress at Your Fingertips
function is not described

WC_Email_Customer_New_Account::trigger() public WC 1.0

Trigger.

{} It's a method of the class: WC_Email_Customer_New_Account{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Email_Customer_New_Account = new WC_Email_Customer_New_Account();
$WC_Email_Customer_New_Account->trigger( $user_id, $user_pass, $password_generated );
$user_id(int) (required)
User ID.
$user_pass(string)
User password.
Default: ''
$password_generated(true|false)
Whether the password was generated automatically or not.
Default: false

Code of WC_Email_Customer_New_Account::trigger() WC 5.9.0

public function trigger( $user_id, $user_pass = '', $password_generated = false ) {
	$this->setup_locale();

	if ( $user_id ) {
		$this->object = new WP_User( $user_id );

		$this->user_pass          = $user_pass;
		$this->user_login         = stripslashes( $this->object->user_login );
		$this->user_email         = stripslashes( $this->object->user_email );
		$this->recipient          = $this->user_email;
		$this->password_generated = $password_generated;
	}

	if ( $this->is_enabled() && $this->get_recipient() ) {
		$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
	}

	$this->restore_locale();
}