fix: inability to delete webhooks via UI#287
Conversation
|
|
ℹ️ Download the latest wp-graphql-headless-webhooks plugin zip from this PR |
There was a problem hiding this comment.
Pull Request Overview
This PR resolves the issue preventing webhook deletion via the UI by updating form actions, nonce verifications, and admin action handling.
- Updated the webhook form to use a simplified POST without an explicit admin URL.
- Revised bulk and single delete logic in the list table with updated nonce checks and permission validations.
- Refactored admin action handling by consolidating save and delete actions and moving submenu registration.
- Removed a redundant jQuery selector from the admin JS file.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| plugins/wp-graphql-headless-webhooks/src/Admin/views/webhook-form.php | Updated form action handling for webhook save operations. |
| plugins/wp-graphql-headless-webhooks/src/Admin/WebhooksListTable.php | Adjusted bulk and single deletion logic and nonce verification. |
| plugins/wp-graphql-headless-webhooks/src/Admin/WebhooksAdmin.php | Refactored admin actions and streamlined webhook deletion flow. |
| plugins/wp-graphql-headless-webhooks/assets/js/admin.js | Removed an unnecessary DOM element reference for header appending. |
Comments suppressed due to low confidence (1)
plugins/wp-graphql-headless-webhooks/src/Admin/views/webhook-form.php:31
- Removing the explicit action URL changes the form submission endpoint; ensure that the intended endpoint is properly handled elsewhere in your admin logic.
<form method="post">
fix: inability to delete webhooks via UI
These changes resolve the issue in the webhooks plugin that prevented deletion of webhooks.
Testing