Fix logic to avoid setting to no again
This commit is contained in:
parent
72ea7b05e7
commit
70f4935236
|
@ -576,12 +576,13 @@ class WC_Admin_Setup_Wizard {
|
|||
update_option( 'woocommerce_price_thousand_sep', $locale_info[ $country ]['thousand_sep'] );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $tracking && 'unknown' === get_option( 'woocommerce_allow_tracking', 'unknown' ) ) {
|
||||
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 ( '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' );
|
||||
}
|
||||
}
|
||||
|
||||
WC_Install::create_pages();
|
||||
|
|
Loading…
Reference in New Issue