Skip to content

Commit

Permalink
Remove unused get transaction endpoint (#10131)
Browse files Browse the repository at this point in the history
  • Loading branch information
zmaglica authored Jan 13, 2025
1 parent 4e21571 commit c285d7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
4 changes: 4 additions & 0 deletions changelog/dev-5961-remove-unused-get-transaction-endpoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Removed unused get single transaction endpoint
19 changes: 0 additions & 19 deletions includes/admin/class-wc-rest-payments-transactions-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,6 @@ public function register_routes() {
'permission_callback' => [ $this, 'check_permission' ],
]
);
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/(?P<transaction_id>\w+)',
[
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_transaction' ],
'permission_callback' => [ $this, 'check_permission' ],
]
);
}

/**
Expand Down Expand Up @@ -179,16 +170,6 @@ public function get_transactions_export( $request ) {
return $this->forward_request( 'get_transactions_export', [ $filters, $user_email, $deposit_id, $locale ] );
}

/**
* Retrieve transaction to respond with via API.
*
* @param WP_REST_Request $request Full data about the request.
*/
public function get_transaction( $request ) {
$transaction_id = $request->get_param( 'transaction_id' );
return $this->forward_request( 'get_transactions', [ 'transaction_id' ] );
}

/**
* Retrieve transactions summary to respond with via API.
*
Expand Down

0 comments on commit c285d7b

Please sign in to comment.