From 8c943c3893997e56bfacc41c6181fa658183fa9e Mon Sep 17 00:00:00 2001 From: pronob1010 Date: Fri, 13 Dec 2024 14:11:56 +0600 Subject: [PATCH 1/2] chore: updated missing args --- includes/REST/DummyDataController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/REST/DummyDataController.php b/includes/REST/DummyDataController.php index 331d744bb1..44b51d5857 100644 --- a/includes/REST/DummyDataController.php +++ b/includes/REST/DummyDataController.php @@ -41,6 +41,7 @@ public function register_routes() { 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'import_dummy_data_status' ), 'permission_callback' => array( $this, 'get_permissions_check' ), + 'args' => [], // No args needed. ), ) ); @@ -63,6 +64,7 @@ public function register_routes() { 'methods' => WP_REST_Server::DELETABLE, 'callback' => array( $this, 'clear_dummy_data' ), 'permission_callback' => array( $this, 'get_permissions_check' ), + 'args' => [], // No args needed. ), ) ); From a89fb53529231f04300bbbe536e325a21c7f5292 Mon Sep 17 00:00:00 2001 From: pronob1010 Date: Fri, 13 Dec 2024 15:21:28 +0600 Subject: [PATCH 2/2] feat: endpoint updated --- includes/REST/ReverseWithdrawalController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/REST/ReverseWithdrawalController.php b/includes/REST/ReverseWithdrawalController.php index 81962bdbbc..8c7c6038d9 100644 --- a/includes/REST/ReverseWithdrawalController.php +++ b/includes/REST/ReverseWithdrawalController.php @@ -103,6 +103,7 @@ public function register_routes() { 'methods' => WP_REST_Server::READABLE, 'callback' => [ $this, 'get_transaction_types' ], 'permission_callback' => [ $this, 'get_transaction_types_permissions_check' ], + 'args' => $this->get_collection_params(), // It returns a collection of items, can added pagination type support ], 'schema' => [ $this, 'get_public_item_schema_for_transaction_types' ], ] @@ -114,6 +115,7 @@ public function register_routes() { 'methods' => WP_REST_Server::READABLE, 'callback' => [ $this, 'get_stores' ], 'permission_callback' => [ $this, 'get_stores_permissions_check' ], + 'args' => $this->get_collection_params(), // This is a collection endpoint ], 'schema' => [ $this, 'get_public_schema_for_stores' ], ]