Automattic\WooCommerce\Internal\OrderReviews

Endpoint::read_order_keyprivateWC 1.0

Read the order key from the request, sanitised.

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

Хуков нет.

Возвращает

Строку.

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

// private - только в коде основоного (родительского) класса
$result = $this->read_order_key(): string;

Код Endpoint::read_order_key() WC 11.0.1

private function read_order_key(): string {
	// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only landing page; the order key is the auth.
	$raw = ( isset( $_GET['key'] ) && is_string( $_GET['key'] ) ) ? wc_clean( wp_unslash( $_GET['key'] ) ) : '';
	return is_string( $raw ) ? $raw : '';
}