WC_Query::parse_request()
Parse the request and look for query vars – endpoints may not be supported.
Description Description
Source Source
File: includes/class-wc-query.php
public function parse_request() { global $wp; // Map query vars to their keys, or get them if endpoints are not supported. foreach ( $this->get_query_vars() as $key => $var ) { if ( isset( $_GET[ $var ] ) ) { // WPCS: input var ok, CSRF ok. $wp->query_vars[ $key ] = sanitize_text_field( wp_unslash( $_GET[ $var ] ) ); // WPCS: input var ok, CSRF ok. } elseif ( isset( $wp->query_vars[ $var ] ) ) { $wp->query_vars[ $key ] = $wp->query_vars[ $var ]; } } }