Automattic\WooCommerce\Admin\API

Products::get_collection_params()publicWC 1.0

Get the query params for collections.

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

Хуков нет.

Возвращает

Массив.

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

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

Код Products::get_collection_params() WC 7.1.0

public function get_collection_params() {
	$params                 = parent::get_collection_params();
	$params['low_in_stock'] = array(
		'description'       => __( 'Limit result set to products that are low or out of stock. (Deprecated)', 'woocommerce' ),
		'type'              => 'boolean',
		'default'           => false,
		'sanitize_callback' => 'wc_string_to_bool',
	);
	$params['search']       = array(
		'description'       => __( 'Search by similar product name or sku.', 'woocommerce' ),
		'type'              => 'string',
		'validate_callback' => 'rest_validate_request_arg',
	);
	return $params;
}