From c161de857bf78abb80a1fc5037e324e81c3388f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomek=20Wytr=C4=99bowicz?= Date: Sat, 18 Feb 2023 18:37:39 +0100 Subject: [PATCH] Reuse parent `register_routes` method in `PerformanceIndicators\Controller` as it is defined in `WC_REST_Reports_V1_Controller`. --- .../Reports/PerformanceIndicators/Controller.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/plugins/woocommerce/src/Admin/API/Reports/PerformanceIndicators/Controller.php b/plugins/woocommerce/src/Admin/API/Reports/PerformanceIndicators/Controller.php index b5d32750257..92308dff6e0 100644 --- a/plugins/woocommerce/src/Admin/API/Reports/PerformanceIndicators/Controller.php +++ b/plugins/woocommerce/src/Admin/API/Reports/PerformanceIndicators/Controller.php @@ -86,19 +86,7 @@ class Controller extends \WC_REST_Reports_Controller { * 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' ), - ) - ); + parent::register_routes(); register_rest_route( $this->namespace,