Automattic\WooCommerce\StoreApi\Routes\V1\Ucp
CatalogSearch::get_request_args
Request body arguments accepted by this route.
Bounds the UCP contract names its own error codes for (query length, price range) stay in the handler, so the response carries those codes rather than rest_invalid_param.
Метод класса: CatalogSearch{}
Хуков нет.
Возвращает
array.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_request_args(): array;
Код CatalogSearch::get_request_args() CatalogSearch::get request args WC 11.3.0
protected function get_request_args(): array {
return array_merge(
parent::get_request_args(),
array(
'query' => array(
'description' => __( 'Free-text search query.', 'woocommerce' ),
'type' => 'string',
),
'filters' => array(
'description' => __( 'Filter criteria to narrow search results.', 'woocommerce' ),
'type' => 'object',
),
'pagination' => array(
'description' => __( 'Requested page size and cursor.', 'woocommerce' ),
'type' => 'object',
),
)
);
}