Automattic\WooCommerce\Admin\API
Products::get_collection_params()
Get the query params for collections.
Method of the class: Products{}
No Hooks.
Return
Array
.
Usage
$Products = new Products(); $Products->get_collection_params();
Products::get_collection_params() Products::get collection params code WC 7.3.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; }