ActionScheduler_QueueCleaner::has_pending_continuationprivateWC 1.0

Whether a continuation of the cleanup is already queued.

Method of the class: ActionScheduler_QueueCleaner{}

No Hooks.

Returns

true|false.

Usage

// private - for code of main (parent) class only
$result = $this->has_pending_continuation();

ActionScheduler_QueueCleaner::has_pending_continuation() code WC 11.0.1

private function has_pending_continuation() {
	$pending = as_get_scheduled_actions(
		array(
			'hook'     => self::CONTINUE_SCHEDULED_CLEANER_HOOK,
			'status'   => ActionScheduler_Store::STATUS_PENDING,
			'per_page' => 1,
		),
		'ids'
	);

	return ! empty( $pending );
}