From 610d32da1a1b11e3ec5684e162457fa7f935bd1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomek=20Wytr=C4=99bowicz?= Date: Sat, 18 Feb 2023 18:18:20 +0100 Subject: [PATCH] Remove redundant `register_routes` definition from `ReportsController`, it's already defined in the exact same shape in its parent `WC_REST_Reports_V1_Controller`. --- .../src/Admin/API/Reports/Controller.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/plugins/woocommerce/src/Admin/API/Reports/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/Controller.php index 992ed93450b..da1bc3992eb 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/Controller.php @@ -31,25 +31,6 @@ class Controller extends \WC_REST_Reports_Controller { */ protected $rest_base = 'reports'; - /** - * Register the routes for reports. - */ - public function register_routes() { - register_rest_route( - $this->namespace, - '/' . $this->rest_base, - array( - array( - 'methods' => \WP_REST_Server::READABLE, - 'callback' => array( $this, 'get_items' ), - 'permission_callback' => array( $this, 'get_items_permissions_check' ), - 'args' => $this->get_collection_params(), - ), - 'schema' => array( $this, 'get_public_item_schema' ), - ) - ); - } - /** * Check whether a given request has permission to read reports. *