Automattic\WooCommerce\Internal\Email\Unsubscribes

Endpoint::verifyprivate staticWC 1.0

Constant-time signature verification.

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

Хуков нет.

Возвращает

true|false.

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

$result = Endpoint::verify( $order_id, $hash, $kind, $signature ): bool;
$order_id(int) (обязательный)
Order id from the URL.
$hash(строка) (обязательный)
Email hash from the URL (already shape-validated).
$kind(строка) (обязательный)
Kind from the URL (sanitized).
$signature(строка) (обязательный)
Signature from the URL.

Код Endpoint::verify() WC 11.0.1

private static function verify( int $order_id, string $hash, string $kind, string $signature ): bool {
	$expected = self::sign( $order_id, $hash, $kind );
	return hash_equals( $expected, $signature );
}