From 19fed02c50093ed8c78c877f2422b2bf61229b37 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 11 Oct 2017 18:15:07 -0300 Subject: [PATCH] Always 'post' on API since there is no more Trash for webhooks --- includes/admin/settings/class-wc-settings-api.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/includes/admin/settings/class-wc-settings-api.php b/includes/admin/settings/class-wc-settings-api.php index dc19fe61eee..3afbd5e4372 100644 --- a/includes/admin/settings/class-wc-settings-api.php +++ b/includes/admin/settings/class-wc-settings-api.php @@ -95,12 +95,7 @@ if ( ! class_exists( 'WC_Settings_Rest_API', false ) ) : if ( 'webhooks' == $current_section ) { if ( isset( $_GET['edit-webhook'] ) ) { - $webhook_id = absint( $_GET['edit-webhook'] ); - $webhook = new WC_Webhook( $webhook_id ); - - if ( 'trash' != $webhook->get_status() ) { - return 'post'; - } + return 'post'; } return 'get';