WC_Email_Customer_New_Account::trigger
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 Email Customer New Account::trigger WC 10.5.2
public function trigger( $user_id, $user_pass = '', $password_generated = false ) {
$this->setup_locale();
if ( $user_id ) {
$this->object = new WP_User( $user_id );
$this->set_password_url = $this->generate_set_password_url();
$this->user_login = stripslashes( $this->object->user_login );
$this->user_email = stripslashes( $this->object->user_email );
$this->recipient = $this->user_email;
$this->user_pass = $user_pass;
$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();
}