password_reset

Fires before the user's password is reset.

Description

do_action( 'password_reset', (object) $user, (string) $new_pass ); 

Parameters (2)

0. $user (object)
The user.
1. $new_pass (string)
New password for the user in plaintext

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'password_reset', $user, $new_pass ); 
The following example is for adding a hook callback.
  1. // define the password_reset callback 
  2. function action_password_reset( $user, $new_pass ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'password_reset', 'action_password_reset', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'password_reset', 'action_password_reset', 10, 2 ); 

Defined (1)

The action is defined in the following location(s).

/includes/shortcodes/class-wc-shortcode-my-account.php  
  1. do_action( 'password_reset', $user, $new_pass );