Merge pull request #19837 from woocommerce/update/obw-tracker-request

Delay tracking request
This commit is contained in:
Mike Jolley 2018-04-24 13:23:31 +01:00 committed by GitHub
commit da9c99a12f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -552,7 +552,7 @@ class WC_Admin_Setup_Wizard {
if ( $tracking ) {
update_option( 'woocommerce_allow_tracking', 'yes' );
WC_Tracker::send_tracking_data( true );
wp_schedule_single_event( time() + 10, 'woocommerce_tracker_send_event', array( true ) );
} else {
update_option( 'woocommerce_allow_tracking', 'no' );
}

View File

@ -368,7 +368,7 @@ class WC_Install {
wp_schedule_event( time(), 'daily', 'woocommerce_cleanup_orders' );
wp_schedule_event( time(), 'twicedaily', 'woocommerce_cleanup_sessions' );
wp_schedule_event( strtotime( 'first tuesday of next month' ), 'monthly', 'woocommerce_geoip_updater' );
wp_schedule_event( time(), apply_filters( 'woocommerce_tracker_event_recurrence', 'daily' ), 'woocommerce_tracker_send_event' );
wp_schedule_event( time() + 10, apply_filters( 'woocommerce_tracker_event_recurrence', 'daily' ), 'woocommerce_tracker_send_event' );
}
/**