WC_Shortcode_My_Account::is_password_reset_bridge_handle │ public static │ WC 11.2.0

Check whether a value has the shape of a password-reset bridge handle.

Method of the class: WC_Shortcode_My_Account{}

No Hooks.

Returns

bool. Whether the value is a well-formed handle.

Usage

$result = WC_Shortcode_My_Account::is_password_reset_bridge_handle( $handle );
$handle(mixed) (required)
Candidate handle.

Changelog

Since 11.2.0 Introduced.

WC_Shortcode_My_Account::is_password_reset_bridge_handle() code WC 11.2.1

public static function is_password_reset_bridge_handle( $handle ) {
	return is_string( $handle )
		&& 1 === preg_match( '/^[A-Za-z0-9]{' . self::PASSWORD_RESET_BRIDGE_HANDLE_LENGTH . '}$/D', $handle );
}