Skip to content

Commit a43f170

Browse files
committed
Update WebhooksAdmin.php
1 parent ad13b9e commit a43f170

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

plugins/wp-graphql-headless-webhooks/src/Admin/WebhooksAdmin.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,9 @@ public function handle_webhook_delete() {
233233
* @return void
234234
*/
235235
public function handle_admin_actions() {
236-
if (
237-
( isset( $_REQUEST['action'] ) && 'delete' === $_REQUEST['action'] ) ||
238-
( isset( $_REQUEST['action2'] ) && 'delete' === $_REQUEST['action2'] )
239-
) {
240-
if ( ! $this->verify_admin_permission() || ! $this->verify_nonce( 'bulk-webhooks', '_wpnonce' ) ) {
236+
// Handle single webhook delete
237+
if ( isset( $_REQUEST['action'] ) && 'delete' === $_REQUEST['action'] && isset( $_GET['webhook'] ) ) {
238+
if ( ! $this->verify_admin_permission() ) {
241239
return;
242240
}
243241

0 commit comments

Comments
 (0)