From 69553d53abdec222b578ceb3f9c6b433294fda29 Mon Sep 17 00:00:00 2001 From: Gerhard Date: Thu, 27 Nov 2014 09:43:43 +0200 Subject: [PATCH] Add button to tools page to reset usage settings. --- includes/admin/class-wc-admin-status.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/includes/admin/class-wc-admin-status.php b/includes/admin/class-wc-admin-status.php index 13429548423..c23f19aa3a6 100644 --- a/includes/admin/class-wc-admin-status.php +++ b/includes/admin/class-wc-admin-status.php @@ -141,6 +141,12 @@ class WC_Admin_Status { echo '

' . __( 'Translation update message hidden successfully!', 'woocommerce' ) . '

'; break; + case 'reset_tracking' : + update_option( 'woocommerce_allow_tracking', false ); + update_option( 'woocommerce_hide_tracking_notice', false ); + + echo '

' . __( 'Usage tracking settings reseted successfully!', 'woocommerce' ) . '

'; + break; default : $action = esc_attr( $_GET['action'] ); if ( isset( $tools[ $action ]['callback'] ) ) { @@ -230,6 +236,11 @@ class WC_Admin_Status { 'name' => __( 'Delete all WooCommerce tax rates', 'woocommerce' ), 'button' => __( 'Delete ALL tax rates', 'woocommerce' ), 'desc' => __( 'Note: This option will delete ALL of your tax rates, use with caution.', 'woocommerce' ), + ), + 'reset_tracking' => array( + 'name' => __( 'Reset Usage Tracking Settings', 'woocommerce' ), + 'button' => __( 'Reset usage tracking settings', 'woocommerce' ), + 'desc' => __( 'This will reset your usage tracking settings, causing it to show the opt-in banner again and not sending any data.', 'woocommerce' ), ) );