WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\StoreApi\Routes

AbstractCartRoute::requires_nonce() protected WC 1.0

Checks if a nonce is required for the route.

{} It's a method of the class: AbstractCartRoute{}

No Hooks.

Return

true|false.

Usage

// protected - for code of main (parent) or child class
$result = $this->requires_nonce( $request );
$request(WP_REST_Request) (required)
Request.

Code of AbstractCartRoute::requires_nonce() WC 5.8.0

protected function requires_nonce( \WP_REST_Request $request ) {
	return 'GET' !== $request->get_method();
}