WC_Shortcode_My_Account::reset_password()
Handles resetting the user's password.
Method of the class: WC_Shortcode_My_Account{}
Hooks from the method
Return
null
. Nothing (null).
Usage
$result = WC_Shortcode_My_Account::reset_password( $user, $new_pass );
- $user(object) (required)
- The user.
- $new_pass(string) (required)
- New password for the user in plaintext.
WC_Shortcode_My_Account::reset_password() WC Shortcode My Account::reset password code WC 9.4.2
public static function reset_password( $user, $new_pass ) { do_action( 'password_reset', $user, $new_pass ); wp_set_password( $new_pass, $user->ID ); update_user_meta( $user->ID, 'default_password_nag', false ); self::set_reset_password_cookie(); if ( ! apply_filters( 'woocommerce_disable_password_change_notification', false ) ) { wp_password_change_notification( $user ); } }