diff --git a/includes/abstracts/abstract-wc-rest-crud-controller.php b/includes/abstracts/abstract-wc-rest-crud-controller.php index d81dbdece0b..6226351f002 100644 --- a/includes/abstracts/abstract-wc-rest-crud-controller.php +++ b/includes/abstracts/abstract-wc-rest-crud-controller.php @@ -471,7 +471,8 @@ abstract class WC_REST_CRUD_Controller extends WC_REST_Posts_Controller { * @return array */ public function get_collection_params() { - $params['context'] = $this->get_context_param(); + $params = array(); + $params['context'] = $this->get_context_param(); $params['context']['default'] = 'view'; $params['page'] = array(