public function get_collection_params()
{
$params = parent::get_collection_params();
$params['context']['default'] = 'view';
$params['after'] = array('description' => __('Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce'), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg');
$params['before'] = array('description' => __('Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce'), 'type' => 'string', 'format' => 'date-time', 'validate_callback' => 'rest_validate_request_arg');
$params['exclude'] = array('description' => __('Ensure result set excludes specific IDs.', 'woocommerce'), 'type' => 'array', 'default' => array(), 'sanitize_callback' => 'wp_parse_id_list');
$params['include'] = array('description' => __('Limit result set to specific ids.', 'woocommerce'), 'type' => 'array', 'default' => array(), 'sanitize_callback' => 'wp_parse_id_list');
$params['offset'] = array('description' => __('Offset the result set by a specific number of items.', 'woocommerce'), 'type' => 'integer', 'sanitize_callback' => 'absint', 'validate_callback' => 'rest_validate_request_arg');
$params['order'] = array('description' => __('Order sort attribute ascending or descending.', 'woocommerce'), 'type' => 'string', 'default' => 'desc', 'enum' => array('asc', 'desc'), 'validate_callback' => 'rest_validate_request_arg');
$params['orderby'] = array('description' => __('Sort collection by object attribute.', 'woocommerce'), 'type' => 'string', 'default' => 'date', 'enum' => array('date', 'id', 'include', 'title', 'slug'), 'validate_callback' => 'rest_validate_request_arg');
$post_type_obj = get_post_type_object($this->post_type);
if (isset($post_type_obj->hierarchical) && $post_type_obj->hierarchical) {
$params['parent'] = array('description' => __('Limit result set to those of particular parent IDs.', 'woocommerce'), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'default' => array());
$params['parent_exclude'] = array('description' => __('Limit result set to all items except those of a particular parent ID.', 'woocommerce'), 'type' => 'array', 'sanitize_callback' => 'wp_parse_id_list', 'default' => array());
}
$params['filter'] = array('description' => __('Use WP Query arguments to modify the response; private query vars require appropriate authorization.', 'woocommerce'));
return $params;
}