Always 'post' on API since there is no more Trash for webhooks

This commit is contained in:
Claudio Sanches 2017-10-11 18:15:07 -03:00
parent 4c26dfa4be
commit 19fed02c50
1 changed files with 1 additions and 6 deletions

View File

@ -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';