Removed "Delete WebHook logs" tool

This commit is contained in:
Claudio Sanches 2017-11-16 15:09:51 -02:00
parent 94ae9678c8
commit 909b80ae31
1 changed files with 0 additions and 15 deletions

View File

@ -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(
'<strong class="red">%1$s</strong> %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' );