Reuse parent `register_routes` method in `PerformanceIndicators\Controller`
as it is defined in `WC_REST_Reports_V1_Controller`.
This commit is contained in:
parent
610d32da1a
commit
c161de857b
|
@ -86,19 +86,7 @@ class Controller extends \WC_REST_Reports_Controller {
|
||||||
* Register the routes for reports.
|
* Register the routes for reports.
|
||||||
*/
|
*/
|
||||||
public function register_routes() {
|
public function register_routes() {
|
||||||
register_rest_route(
|
parent::register_routes();
|
||||||
$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' ),
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
register_rest_route(
|
register_rest_route(
|
||||||
$this->namespace,
|
$this->namespace,
|
||||||
|
|
Loading…
Reference in New Issue