WordPress at Your Fingertips
function is not described

ActionScheduler_ActionFactory::recurring() public WC 1.0

Create the first instance of an action recurring on a given interval.

{} It's a method of the class: ActionScheduler_ActionFactory{}

No Hooks.


Int. The ID of the stored action


$ActionScheduler_ActionFactory = new ActionScheduler_ActionFactory();
$ActionScheduler_ActionFactory->recurring( $hook, $args, $first, $interval, $group );
$hook(string) (required)
The hook to trigger when this action runs
Args to pass when the hook is triggered
Default: array()
Unix timestamp for the first run
Default: null
Seconds between runs
Default: null
A group to put the action in
Default: ''

Code of ActionScheduler_ActionFactory::recurring() WC 6.1.1

public function recurring( $hook, $args = array(), $first = null, $interval = null, $group = '' ) {
	if ( empty($interval) ) {
		return $this->single( $hook, $args, $first, $group );
	$date = as_get_datetime_object( $first );
	$schedule = new ActionScheduler_IntervalSchedule( $date, $interval );
	$action = new ActionScheduler_Action( $hook, $args, $schedule, $group );
	return $this->store( $action );