WC_REST_Coupons_V1_Controller::get_collection_params()publicWC 1.0

Get the query params for collections of attachments.

Method of the class: WC_REST_Coupons_V1_Controller{}

No Hooks.

Return

Array.

Usage

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

WC_REST_Coupons_V1_Controller::get_collection_params() code WC 8.6.1

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;
}