WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_REST_Products_V1_Controller::get_collection_params() public WC 1.0

Get the query params for collections of attachments.

Это метод класса: WC_REST_Products_V1_Controller{}

Хуков нет.

Возвращает

Массив.

Использование

$WC_REST_Products_V1_Controller = new WC_REST_Products_V1_Controller();
$WC_REST_Products_V1_Controller->get_collection_params();

Код WC_REST_Products_V1_Controller::get_collection_params() WC 4.5.2

woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-products-v1-controller.php
<?php
public function get_collection_params() {
	$params = parent::get_collection_params();

	$params['slug'] = array(
		'description'       => __( 'Limit result set to products with a specific slug.', 'woocommerce' ),
		'type'              => 'string',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['status'] = array(
		'default'           => 'any',
		'description'       => __( 'Limit result set to products assigned a specific status.', 'woocommerce' ),
		'type'              => 'string',
		'enum'              => array_merge( array( 'any', 'future' ), array_keys( get_post_statuses() ) ),
		'sanitize_callback' => 'sanitize_key',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['type'] = array(
		'description'       => __( 'Limit result set to products assigned a specific type.', 'woocommerce' ),
		'type'              => 'string',
		'enum'              => array_keys( wc_get_product_types() ),
		'sanitize_callback' => 'sanitize_key',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['category'] = array(
		'description'       => __( 'Limit result set to products assigned a specific category ID.', 'woocommerce' ),
		'type'              => 'string',
		'sanitize_callback' => 'wp_parse_id_list',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['tag'] = array(
		'description'       => __( 'Limit result set to products assigned a specific tag ID.', 'woocommerce' ),
		'type'              => 'string',
		'sanitize_callback' => 'wp_parse_id_list',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['shipping_class'] = array(
		'description'       => __( 'Limit result set to products assigned a specific shipping class ID.', 'woocommerce' ),
		'type'              => 'string',
		'sanitize_callback' => 'wp_parse_id_list',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['attribute'] = array(
		'description'       => __( 'Limit result set to products with a specific attribute.', 'woocommerce' ),
		'type'              => 'string',
		'sanitize_callback' => 'sanitize_text_field',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['attribute_term'] = array(
		'description'       => __( 'Limit result set to products with a specific attribute term ID (required an assigned attribute).', 'woocommerce' ),
		'type'              => 'string',
		'sanitize_callback' => 'wp_parse_id_list',
		'validate_callback' => 'rest_validate_request_arg',
	);
	$params['sku'] = array(
		'description'       => __( 'Limit result set to products with a specific SKU.', 'woocommerce' ),
		'type'              => 'string',
		'sanitize_callback' => 'sanitize_text_field',
		'validate_callback' => 'rest_validate_request_arg',
	);

	return $params;
}