Automattic\WooCommerce\Internal\DataStores\Orders

DataSynchronizer::schedule_background_sync()privateWC 1.0

Schedule an event to run background sync when the mode is set to interval.

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

Хуков нет.

Возвращает

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

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

// private - только в коде основоного (родительского) класса
$result = $this->schedule_background_sync();

Код DataSynchronizer::schedule_background_sync() WC 8.7.0

private function schedule_background_sync() {
	$interval = $this->get_background_sync_interval();

	// Calling Action Scheduler directly because WC_Action_Queue doesn't support the unique parameter yet.
	as_schedule_recurring_action(
		time() + $interval,
		$interval,
		self::BACKGROUND_SYNC_EVENT_HOOK,
		array(),
		'',
		true
	);
}