WC_Shortcode_My_Account::create_password_reset_form_token │ private static │ WC 1.0

Create the signed token submitted by the reset-password form.

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

Хуков нет.

Возвращает

string. Signed form token.

Использование

$result = WC_Shortcode_My_Account::create_password_reset_form_token( $user, $expiration );
$user(WP_User) (обязательный)
Token owner.
$expiration(int) (обязательный)
Unix expiry timestamp.

Код WC_Shortcode_My_Account::create_password_reset_form_token() WC 11.3.0

private static function create_password_reset_form_token( $user, $expiration ) {
	$nonce     = wp_generate_password( 32, false, false );
	$signature = self::get_password_reset_bridge_signature( $user, $expiration, $nonce );

	return implode( '.', array( self::PASSWORD_RESET_FORM_TOKEN_VERSION, $user->ID, $expiration, $nonce, $signature ) );
}