WC_Email_Customer_Reset_Password::trigger( string $user_login = '', string $reset_key = '' )
Trigger.
Description Description
Parameters Parameters
- $user_login
-
(Optional) User login.
Default value: ''
- $reset_key
-
(Optional) Password reset key.
Default value: ''
Source Source
File: includes/emails/class-wc-email-customer-reset-password.php
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(); }