Automattic\WooCommerce\Internal\DataStores\Orders

DataSynchronizer::handle_interval_background_sync()publicWC 1.0

Callback to check for pending syncs and enqueue the background data sync processor when in interval mode.

Метод класса: DataSynchronizer{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$DataSynchronizer = new DataSynchronizer();
$DataSynchronizer->handle_interval_background_sync();

Код DataSynchronizer::handle_interval_background_sync() WC 9.7.1

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 );
	}
}