Automattic\WooCommerce\Internal\DataStores\Orders
DataSynchronizer::handle_continuous_background_sync
Callback to keep the background data sync processor enqueued when in continuous mode.
Method of the class: DataSynchronizer{}
No Hooks.
Returns
null. Nothing (null).
Usage
$DataSynchronizer = new DataSynchronizer(); $DataSynchronizer->handle_continuous_background_sync();
DataSynchronizer::handle_continuous_background_sync() DataSynchronizer::handle continuous background sync code WC 10.7.0
public function handle_continuous_background_sync() {
if ( self::BACKGROUND_SYNC_MODE_CONTINUOUS !== $this->get_background_sync_mode() ) {
$this->batch_processing_controller->remove_processor( self::class );
return;
}
// This method already checks if a processor is enqueued before adding it to avoid duplication.
$this->batch_processing_controller->enqueue_processor( self::class );
}