@@ 42-52 (lines=11) @@ | ||
39 | /** |
|
40 | * Register the routes for customers. |
|
41 | */ |
|
42 | public function register_routes() { |
|
43 | register_rest_route( $this->namespace, '/' . $this->rest_base, array( |
|
44 | array( |
|
45 | 'methods' => WP_REST_Server::READABLE, |
|
46 | 'callback' => array( $this, 'get_items' ), |
|
47 | 'permission_callback' => array( $this, 'get_items_permissions_check' ), |
|
48 | 'args' => $this->get_collection_params(), |
|
49 | ), |
|
50 | 'schema' => array( $this, 'get_public_item_schema' ), |
|
51 | ) ); |
|
52 | } |
|
53 | ||
54 | /** |
|
55 | * Check whether a given request has permission to read customers. |
@@ 49-59 (lines=11) @@ | ||
46 | /** |
|
47 | * Register the routes for sales reports. |
|
48 | */ |
|
49 | public function register_routes() { |
|
50 | register_rest_route( $this->namespace, '/' . $this->rest_base, array( |
|
51 | array( |
|
52 | 'methods' => WP_REST_Server::READABLE, |
|
53 | 'callback' => array( $this, 'get_items' ), |
|
54 | 'permission_callback' => array( $this, 'get_items_permissions_check' ), |
|
55 | 'args' => $this->get_collection_params(), |
|
56 | ), |
|
57 | 'schema' => array( $this, 'get_public_item_schema' ), |
|
58 | ) ); |
|
59 | } |
|
60 | ||
61 | /** |
|
62 | * Check whether a given request has permission to read report. |
@@ 42-52 (lines=11) @@ | ||
39 | /** |
|
40 | * Register the routes for reports. |
|
41 | */ |
|
42 | public function register_routes() { |
|
43 | register_rest_route( $this->namespace, '/' . $this->rest_base, array( |
|
44 | array( |
|
45 | 'methods' => WP_REST_Server::READABLE, |
|
46 | 'callback' => array( $this, 'get_items' ), |
|
47 | 'permission_callback' => array( $this, 'get_items_permissions_check' ), |
|
48 | 'args' => $this->get_collection_params(), |
|
49 | ), |
|
50 | 'schema' => array( $this, 'get_public_item_schema' ), |
|
51 | ) ); |
|
52 | } |
|
53 | ||
54 | /** |
|
55 | * Check whether a given request has permission to read reports. |