From 909b80ae31b79e0085545ec2dbad03b223ff49b2 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Thu, 16 Nov 2017 15:09:51 -0200 Subject: [PATCH] Removed "Delete WebHook logs" tool --- ...ass-wc-rest-system-status-tools-controller.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/includes/api/class-wc-rest-system-status-tools-controller.php b/includes/api/class-wc-rest-system-status-tools-controller.php index ed63e5cb957..f4fe76d40cc 100644 --- a/includes/api/class-wc-rest-system-status-tools-controller.php +++ b/includes/api/class-wc-rest-system-status-tools-controller.php @@ -174,15 +174,6 @@ class WC_REST_System_Status_Tools_Controller extends WC_REST_Controller { __( 'This option will delete ALL of your tax rates, use with caution. This action cannot be reversed.', 'woocommerce' ) ), ), - 'delete_webhook_logs' => array( - 'name' => __( 'Delete WebHook logs', 'woocommerce' ), - 'button' => __( 'Delete logs', 'woocommerce' ), - 'desc' => sprintf( - '%1$s %2$s', - __( 'Note:', 'woocommerce' ), - __( 'This tool removes WebHook logs. This will not delete the WebHooks themselves.', 'woocommerce' ) - ), - ), 'reset_tracking' => array( 'name' => __( 'Reset usage tracking', 'woocommerce' ), 'button' => __( 'Reset', 'woocommerce' ), @@ -447,12 +438,6 @@ class WC_REST_System_Status_Tools_Controller extends WC_REST_Controller { WC_Cache_Helper::incr_cache_prefix( 'taxes' ); $message = __( 'Tax rates successfully deleted', 'woocommerce' ); break; - case 'delete_webhook_logs' : - - $result = absint( $wpdb->query( "DELETE FROM {$wpdb->comments} WHERE comment_type='webhook_delivery';" ) ); - $wpdb->query( "DELETE commentmeta FROM {$wpdb->commentmeta} commentmeta LEFT JOIN {$wpdb->comments} comments ON comments.comment_ID = commentmeta.comment_id WHERE comments.comment_ID IS NULL;" ); - $message = sprintf( __( '%d logs deleted', 'woocommerce' ), $result ); - break; case 'reset_tracking' : delete_option( 'woocommerce_allow_tracking' ); WC_Admin_Notices::add_notice( 'tracking' );