Remove redundant `register_routes` definition from `ReportsController`,

it's already defined in the exact same shape in its parent `WC_REST_Reports_V1_Controller`.
This commit is contained in:
Tomek Wytrębowicz 2023-02-18 18:18:20 +01:00
parent bd8168feb5
commit 610d32da1a
1 changed files with 0 additions and 19 deletions

View File

@ -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.
*