Automattic\WooCommerce\Internal\Admin\Onboarding

OnboardingSetupWizard::is_running_from_async_action_scheduler()privateWC 1.0

Test whether the context of execution comes from async action scheduler. Note: this is a polyfill for wc_is_running_from_async_action_scheduler() which was introduced in WC 4.0.

{} Это метод класса: OnboardingSetupWizard{}

Хуков нет.

Возвращает

true|false.

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

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

Код OnboardingSetupWizard::is_running_from_async_action_scheduler() WC 6.6.1

private function is_running_from_async_action_scheduler() {
	if ( function_exists( '\wc_is_running_from_async_action_scheduler' ) ) {
		return \wc_is_running_from_async_action_scheduler();
	}

	// phpcs:ignore WordPress.Security.NonceVerification.Recommended
	return isset( $_REQUEST['action'] ) && 'as_async_request_queue_runner' === $_REQUEST['action'];
}