WC_Shortcode_My_Account::check_password_reset_key()public staticWC 1.0

Retrieves a user row based on password reset key and login.

Метод класса: WC_Shortcode_My_Account{}

Хуков нет.


WP_User|true|false. User's database row on success, false for invalid keys


$result = WC_Shortcode_My_Account::check_password_reset_key( $key, $login );
$key(строка) (обязательный)
Hash to validate sending user's password.
$login(строка) (обязательный)
The user login.

Код WC_Shortcode_My_Account::check_password_reset_key() WC 7.3.0

public static function check_password_reset_key( $key, $login ) {
	// Check for the password reset key.
	// Get user data or an error message in case of invalid or expired key.
	$user = check_password_reset_key( $key, $login );

	if ( is_wp_error( $user ) ) {
		wc_add_notice( __( 'This key is invalid or has already been used. Please reset your password again if needed.', 'woocommerce' ), 'error' );
		return false;

	return $user;