Skip to content

fix: inability to delete webhooks via UI #287

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

Merged
merged 8 commits into from
Jun 27, 2025
Merged

Conversation

josephfusco
Copy link
Member

@josephfusco josephfusco commented Jun 26, 2025

These changes resolve the issue in the webhooks plugin that prevented deletion of webhooks.

Testing

  1. Pull down changes from this branch
  2. Run the webhooks-isr example
  3. Login to WordPress and test delete & bulk delete actions work as expected

Copy link

changeset-bot bot commented Jun 26, 2025

⚠️ No Changeset found

Latest commit: 797b03c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@josephfusco josephfusco changed the title Fix inability to delete via UI fix: inability to delete webhooks via UI Jun 26, 2025
Copy link

github-actions bot commented Jun 26, 2025

ℹ️ Download the latest wp-graphql-headless-webhooks plugin zip from this PR
(See the 'Artifacts' section at the bottom)

@josephfusco josephfusco marked this pull request as ready for review June 26, 2025 19:24
@josephfusco josephfusco requested a review from a team as a code owner June 26, 2025 19:24
@josephfusco josephfusco requested review from theodesp and Copilot June 26, 2025 19:34
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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">

@josephfusco josephfusco enabled auto-merge June 27, 2025 15:17
@josephfusco josephfusco added this pull request to the merge queue Jun 27, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jun 27, 2025
fix: inability to delete webhooks via UI
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to Branch Protection failures Jun 27, 2025
You're not authorized to push to this branch. Visit "About protected branches" for more information.
@josephfusco josephfusco enabled auto-merge June 27, 2025 15:40
@josephfusco josephfusco added this pull request to the merge queue Jun 27, 2025
Merged via the queue into main with commit ac72766 Jun 27, 2025
6 checks passed
@josephfusco josephfusco deleted the feat-webhooks-ui branch June 27, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants