ActionScheduler_ActionFactory::cron_unique()publicWC 1.0

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

Хуков нет.

Возвращает

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

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

$ActionScheduler_ActionFactory = new ActionScheduler_ActionFactory();
$ActionScheduler_ActionFactory->cron_unique( $hook, $args, $base_timestamp, $schedule, $group, $unique );
$hook (обязательный)
-
$args **
-
По умолчанию: array()
$base_timestamp **
-
По умолчанию: null
$schedule **
-
По умолчанию: null
$group **
-
По умолчанию: ''
$unique **
-
По умолчанию: true

Код ActionScheduler_ActionFactory::cron_unique() WC 9.3.3

public function cron_unique( $hook, $args = array(), $base_timestamp = null, $schedule = null, $group = '', $unique = true ) {
	if ( empty( $schedule ) ) {
		return $this->single_unique( $hook, $args, $base_timestamp, $group, $unique );
	}
	$date     = as_get_datetime_object( $base_timestamp );
	$cron     = CronExpression::factory( $schedule );
	$schedule = new ActionScheduler_CronSchedule( $date, $cron );
	$action   = new ActionScheduler_Action( $hook, $args, $schedule, $group );
	return $unique ? $this->store_unique_action( $action ) : $this->store( $action );
}