Automattic\WooCommerce\Blocks\Patterns

PTKPatternsStore::schedule_fetch_patternsprivateWC 1.0

Schedule an async action to fetch the PTK patterns when the scheduler is initialized.

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

Хуков нет.

Возвращает

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

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

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

Код PTKPatternsStore::schedule_fetch_patterns() WC 10.3.5

private function schedule_fetch_patterns() {
	if ( did_action( 'action_scheduler_init' ) ) {
		$this->schedule_action_if_not_pending( 'fetch_patterns' );
	} else {
		add_action(
			'action_scheduler_init',
			function () {
				$this->schedule_action_if_not_pending( 'fetch_patterns' );
			}
		);
	}
}