Automattic\WooCommerce\Internal\DataStores\Orders
DataSynchronizer::handle_interval_background_sync
Callback to check for pending syncs and enqueue the background data sync processor when in interval mode.
Method of the class: DataSynchronizer{}
No Hooks.
Returns
null. Nothing (null).
Usage
$DataSynchronizer = new DataSynchronizer(); $DataSynchronizer->handle_interval_background_sync();
DataSynchronizer::handle_interval_background_sync() DataSynchronizer::handle interval background sync code WC 10.7.0
public function handle_interval_background_sync() {
if ( self::BACKGROUND_SYNC_MODE_INTERVAL !== $this->get_background_sync_mode() ) {
$this->unschedule_background_sync();
return;
}
$pending_count = $this->get_total_pending_count();
if ( $pending_count > 0 ) {
$this->batch_processing_controller->enqueue_processor( self::class );
}
}