Automattic\WooCommerce\Internal\Admin\Onboarding
OnboardingSetupWizard::is_running_from_async_action_scheduler()
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.
Method of the class: OnboardingSetupWizard{}
No Hooks.
Return
true|false
.
Usage
// private - for code of main (parent) class only $result = $this->is_running_from_async_action_scheduler();
OnboardingSetupWizard::is_running_from_async_action_scheduler() OnboardingSetupWizard::is running from async action scheduler code WC 9.3.3
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']; }