wc_is_running_from_async_action_scheduler()WC 4.0.0

Test whether the context of execution comes from async action scheduler.

Хуков нет.

Возвращает

true|false.

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

wc_is_running_from_async_action_scheduler();

Список изменений

С версии 4.0.0 Введена.

Код wc_is_running_from_async_action_scheduler() WC 6.9.4

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