Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused get transaction endpoint #10131

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading