Automattic\WooCommerce\StoreApi\Routes\V1\Ucp
CatalogSearch::store_api_request
Wrap collection parameters in the request object ProductQuery reads.
Метод класса: CatalogSearch{}
Хуков нет.
Возвращает
\WP_REST_Request<array<string,. mixed>>
Использование
// private - только в коде основоного (родительского) класса $result = $this->store_api_request( $params ): \WP_REST_Request;
- $params(массив) (обязательный)
- Store API product collection parameters.
Код CatalogSearch::store_api_request() CatalogSearch::store api request WC 11.3.0
private function store_api_request( array $params ): \WP_REST_Request {
/**
* Typed for static analysis; WP_REST_Request is generic in the stubs.
*
* @var \WP_REST_Request<array<string, mixed>> $request
*/
$request = new \WP_REST_Request( 'GET', '/wc/store/v1/products' );
$request->set_query_params( $params );
return $request;
}