WC_Email_Customer_Reset_Password::trigger()
Trigger.
Method of the class: WC_Email_Customer_Reset_Password{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Email_Customer_Reset_Password = new WC_Email_Customer_Reset_Password(); $WC_Email_Customer_Reset_Password->trigger( $user_login, $reset_key );
- $user_login(string)
- User login.
Default: '' - $reset_key(string)
- Password reset key.
Default: ''
WC_Email_Customer_Reset_Password::trigger() WC Email Customer Reset Password::trigger code WC 8.7.0
public function trigger( $user_login = '', $reset_key = '' ) { $this->setup_locale(); if ( $user_login && $reset_key ) { $this->object = get_user_by( 'login', $user_login ); $this->user_id = $this->object->ID; $this->user_login = $user_login; $this->reset_key = $reset_key; $this->user_email = stripslashes( $this->object->user_email ); $this->recipient = $this->user_email; } 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(); }