WC_Email_Customer_New_Account::trigger()publicWC 1.0

Trigger.

Метод класса: WC_Email_Customer_New_Account{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$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) (обязательный)
User ID.
$user_pass(строка)
User password.
По умолчанию: ''
$password_generated(true|false)
Whether the password was generated automatically or not.
По умолчанию: false

Код WC_Email_Customer_New_Account::trigger() WC 8.7.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;
		$this->set_password_url   = $this->generate_set_password_url();
	}

	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();
}