Add button to tools page to reset usage settings.
This commit is contained in:
parent
144c683d7b
commit
69553d53ab
|
@ -141,6 +141,12 @@ class WC_Admin_Status {
|
||||||
|
|
||||||
echo '<div class="updated"><p>' . __( 'Translation update message hidden successfully!', 'woocommerce' ) . '</p></div>';
|
echo '<div class="updated"><p>' . __( 'Translation update message hidden successfully!', 'woocommerce' ) . '</p></div>';
|
||||||
break;
|
break;
|
||||||
|
case 'reset_tracking' :
|
||||||
|
update_option( 'woocommerce_allow_tracking', false );
|
||||||
|
update_option( 'woocommerce_hide_tracking_notice', false );
|
||||||
|
|
||||||
|
echo '<div class="updated"><p>' . __( 'Usage tracking settings reseted successfully!', 'woocommerce' ) . '</p></div>';
|
||||||
|
break;
|
||||||
default :
|
default :
|
||||||
$action = esc_attr( $_GET['action'] );
|
$action = esc_attr( $_GET['action'] );
|
||||||
if ( isset( $tools[ $action ]['callback'] ) ) {
|
if ( isset( $tools[ $action ]['callback'] ) ) {
|
||||||
|
@ -230,6 +236,11 @@ class WC_Admin_Status {
|
||||||
'name' => __( 'Delete all WooCommerce tax rates', 'woocommerce' ),
|
'name' => __( 'Delete all WooCommerce tax rates', 'woocommerce' ),
|
||||||
'button' => __( 'Delete ALL tax rates', 'woocommerce' ),
|
'button' => __( 'Delete ALL tax rates', 'woocommerce' ),
|
||||||
'desc' => __( '<strong class="red">Note:</strong> This option will delete ALL of your tax rates, use with caution.', 'woocommerce' ),
|
'desc' => __( '<strong class="red">Note:</strong> 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' ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue