Automattic\WooCommerce\Internal\OrderReviews

Endpoint::read_order_keyprivateWC 1.0

Read the order key from the request, sanitised.

Method of the class: Endpoint{}

No Hooks.

Returns

String.

Usage

// private - for code of main (parent) class only
$result = $this->read_order_key(): string;

Endpoint::read_order_key() code WC 10.8.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 : '';
}