From 800ad318e349b9dccd1f5190a3efdf480ecd9bd2 Mon Sep 17 00:00:00 2001 From: Timmy Crawford Date: Wed, 27 Mar 2019 15:29:55 -0700 Subject: [PATCH] OBW: Ensure tracker opt-in is always shown. --- .../admin/class-wc-admin-setup-wizard.php | 41 ++++++++----------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/includes/admin/class-wc-admin-setup-wizard.php b/includes/admin/class-wc-admin-setup-wizard.php index 7436b4ddd94..53d55b2f172 100644 --- a/includes/admin/class-wc-admin-setup-wizard.php +++ b/includes/admin/class-wc-admin-setup-wizard.php @@ -522,24 +522,18 @@ class WC_Admin_Setup_Wizard { - -
-

- - -

-

- ' . esc_html__( 'Read more about what we collect.', 'woocommerce' ) . ''; - ?> -

-
+
+

+ + +

+

+ esc_html_e( 'Gathering usage data allows us to make WooCommerce better — your store will be considered as we evaluate new features, judge the quality of an update, or determine if an improvement makes sense. If you would rather opt-out, and do not check this box, we will not know this store exists and we will not collect any usage data.', 'woocommerce' ); + echo ' ' . esc_html__( 'Read more about what we collect.', 'woocommerce' ) . ''; + ?> +

+

@@ -587,13 +581,12 @@ class WC_Admin_Setup_Wizard { update_option( 'woocommerce_price_thousand_sep', $locale_info[ $country ]['thousand_sep'] ); } } - if ( 'unknown' === get_option( 'woocommerce_allow_tracking', 'unknown' ) ) { - if ( $tracking ) { - update_option( 'woocommerce_allow_tracking', 'yes' ); - wp_schedule_single_event( time() + 10, 'woocommerce_tracker_send_event', array( true ) ); - } else { - update_option( 'woocommerce_allow_tracking', 'no' ); - } + + if ( $tracking ) { + update_option( 'woocommerce_allow_tracking', 'yes' ); + wp_schedule_single_event( time() + 10, 'woocommerce_tracker_send_event', array( true ) ); + } else { + update_option( 'woocommerce_allow_tracking', 'no' ); } WC_Install::create_pages();