OBW: Ensure tracker opt-in is always shown.
This commit is contained in:
parent
4cad501098
commit
800ad318e3
|
@ -522,24 +522,18 @@ class WC_Admin_Setup_Wizard {
|
||||||
<?php esc_html_e( 'I will also be selling products or services in person.', 'woocommerce' ); ?>
|
<?php esc_html_e( 'I will also be selling products or services in person.', 'woocommerce' ); ?>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<?php
|
<div class="woocommerce-tracker">
|
||||||
if ( 'unknown' === get_option( 'woocommerce_allow_tracking', 'unknown' ) ) {
|
<p class="checkbox">
|
||||||
?>
|
<input type="checkbox" id="wc_tracker_checkbox" name="wc_tracker_checkbox" value="yes" checked />
|
||||||
<div class="woocommerce-tracker">
|
<label for="wc_tracker_checkbox"><?php esc_html_e( 'Help WooCommerce improve with usage tracking.', 'woocommerce' ); ?></label>
|
||||||
<p class="checkbox">
|
</p>
|
||||||
<input type="checkbox" id="wc_tracker_checkbox" name="wc_tracker_checkbox" value="yes" checked />
|
<p>
|
||||||
<label for="wc_tracker_checkbox"><?php esc_html_e( 'Help WooCommerce improve with usage tracking.', 'woocommerce' ); ?></label>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<?php
|
|
||||||
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 ' <a target="_blank" href="https://woocommerce.com/usage-tracking/">' . esc_html__( 'Read more about what we collect.', 'woocommerce' ) . '</a>';
|
|
||||||
?>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<?php
|
<?php
|
||||||
}
|
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 ' <a target="_blank" href="https://woocommerce.com/usage-tracking/">' . esc_html__( 'Read more about what we collect.', 'woocommerce' ) . '</a>';
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<p class="wc-setup-actions step">
|
<p class="wc-setup-actions step">
|
||||||
<button type="submit" class="button-primary button button-large button-next" value="<?php esc_attr_e( "Let's go!", 'woocommerce' ); ?>" name="save_step"><?php esc_html_e( "Let's go!", 'woocommerce' ); ?></button>
|
<button type="submit" class="button-primary button button-large button-next" value="<?php esc_attr_e( "Let's go!", 'woocommerce' ); ?>" name="save_step"><?php esc_html_e( "Let's go!", 'woocommerce' ); ?></button>
|
||||||
</p>
|
</p>
|
||||||
|
@ -587,13 +581,12 @@ class WC_Admin_Setup_Wizard {
|
||||||
update_option( 'woocommerce_price_thousand_sep', $locale_info[ $country ]['thousand_sep'] );
|
update_option( 'woocommerce_price_thousand_sep', $locale_info[ $country ]['thousand_sep'] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( 'unknown' === get_option( 'woocommerce_allow_tracking', 'unknown' ) ) {
|
|
||||||
if ( $tracking ) {
|
if ( $tracking ) {
|
||||||
update_option( 'woocommerce_allow_tracking', 'yes' );
|
update_option( 'woocommerce_allow_tracking', 'yes' );
|
||||||
wp_schedule_single_event( time() + 10, 'woocommerce_tracker_send_event', array( true ) );
|
wp_schedule_single_event( time() + 10, 'woocommerce_tracker_send_event', array( true ) );
|
||||||
} else {
|
} else {
|
||||||
update_option( 'woocommerce_allow_tracking', 'no' );
|
update_option( 'woocommerce_allow_tracking', 'no' );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WC_Install::create_pages();
|
WC_Install::create_pages();
|
||||||
|
|
Loading…
Reference in New Issue