WC_REST_Coupons_V2_Controller::get_collection_params
Get the query params for collections of attachments.
Method of the class: WC_REST_Coupons_V2_Controller{}
No Hooks.
Returns
Array.
Usage
$WC_REST_Coupons_V2_Controller = new WC_REST_Coupons_V2_Controller(); $WC_REST_Coupons_V2_Controller->get_collection_params();
WC_REST_Coupons_V2_Controller::get_collection_params() WC REST Coupons V2 Controller::get collection params code WC 10.3.6
public function get_collection_params() {
$params = parent::get_collection_params();
$params['code'] = array(
'description' => __( 'Limit result set to resources with a specific code.', 'woocommerce' ),
'type' => 'string',
'sanitize_callback' => 'sanitize_text_field',
'validate_callback' => 'rest_validate_request_arg',
);
return $params;
}