WordPress at Your Fingertips
function is not described

WC_REST_Product_Variations_Controller::get_collection_params() public WC 1.0

Get the query params for collections of attachments.

{} It's a method of the class: WC_REST_Product_Variations_Controller{}

No Hooks.

Return

Array.

Usage

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

Code of WC_REST_Product_Variations_Controller::get_collection_params() WC 5.9.0

public function get_collection_params() {
	$params = parent::get_collection_params();

	unset(
		$params['in_stock'],
		$params['type'],
		$params['featured'],
		$params['category'],
		$params['tag'],
		$params['shipping_class'],
		$params['attribute'],
		$params['attribute_term']
	);

	$params['stock_status'] = array(
		'description'       => __( 'Limit result set to products with specified stock status.', 'woocommerce' ),
		'type'              => 'string',
		'enum'              => array_keys( wc_get_product_stock_status_options() ),
		'sanitize_callback' => 'sanitize_text_field',
		'validate_callback' => 'rest_validate_request_arg',
	);

	return $params;
}