Menu

## functions.php

### Table of Contents

wc_schedule_single_action() : string
  Schedule an action to run one time
wc_schedule_recurring_action() : string
  Schedule a recurring action
wc_schedule_cron_action() : string
  Schedule an action that recurs on a cron-like schedule.
wc_unschedule_action() : mixed
  Cancel the next occurrence of a job.
wc_next_scheduled_action() : int|bool
wc_get_scheduled_actions() : array<string|int, mixed>
  Find scheduled actions

### Functions

#### wc_schedule_single_action()

functions.php : 21

Schedule an action to run one time

`wc_schedule_single_action(int $timestamp, string $hook[, array<string|int, mixed> $args = array() ][, string $group = '' ]) : string`

##### Parameters

$timestamp : int

  When the job will run

$hook : string

  The hook to trigger

$args : array<string|int, mixed> = array()

  Arguments to pass when the hook triggers

$group : string = ''

  The group to assign this job to

#### wc_schedule_recurring_action()

functions.php : 39

Schedule a recurring action

`wc_schedule_recurring_action(int $timestamp, int $interval_in_seconds, string $hook[, array<string|int, mixed> $args = array() ][, string $group = '' ]) : string`

##### Parameters

$timestamp : int

  When the first instance of the job will run

$interval_in_seconds : int

  How long to wait between runs

$hook : string

  The hook to trigger

$args : array<string|int, mixed> = array()

  Arguments to pass when the hook triggers

$group : string = ''

  The group to assign this job to

##### Tags

deprecated
  2.1.0

#### wc_schedule_cron_action()

functions.php : 67

Schedule an action that recurs on a cron-like schedule.

`wc_schedule_cron_action(int $timestamp, string $schedule, string $hook[, array<string|int, mixed> $args = array() ][, string $group = '' ]) : string`

##### Parameters

$timestamp : int

  The schedule will start on or after this time

$schedule : string

  A cron-link schedule string

$hook : string

  The hook to trigger

$args : array<string|int, mixed> = array()

  Arguments to pass when the hook triggers

$group : string = ''

  The group to assign this job to

##### Tags

see
  http://en.wikipedia.org/wiki/Cron

  ┬ ┬ ┬ ┬ ┬ ┬ | | | | | | | | | | | + year [optional] | | | | +----- day of week (0 - 7) (Sunday=0 or 7) | | | +---------- month (1 - 12) | | +--------------- day of month (1 - 31) | +-------------------- hour (0 - 23) +------------------------- min (0 - 59)

deprecated
  2.1.0

#### wc_unschedule_action()

functions.php : 81

Cancel the next occurrence of a job.

`wc_unschedule_action(string $hook[, array<string|int, mixed> $args = array() ][, string $group = '' ]) : mixed`

##### Parameters

$hook : string

  The hook that the job will trigger

$args : array<string|int, mixed> = array()

  Args that would have been passed to the job

$group : string = ''

##### Tags

deprecated
  2.1.0

#### wc_next_scheduled_action()

functions.php : 95
`wc_next_scheduled_action(string $hook[, array<string|int, mixed> $args = NULL ][, string $group = '' ]) : int|bool`

##### Parameters

$hook : string
$args : array<string|int, mixed> = NULL
$group : string = ''

##### Tags

deprecated
  2.1.0

#### wc_get_scheduled_actions()

functions.php : 123

Find scheduled actions

`wc_get_scheduled_actions([array<string|int, mixed> $args = array() ][, string $return_format = OBJECT ]) : array<string|int, mixed>`

##### Parameters

$args : array<string|int, mixed> = array()

  Possible arguments, with their default values: 'hook' => '' - the name of the action that will be triggered 'args' => NULL - the args array that will be passed with the action 'date' => NULL - the scheduled date of the action. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone. 'date_compare' => '<=' - operator for testing "date". accepted values are '!=', '>', '>=', '<', '<=', '=' 'modified' => NULL - the date the action was last updated. Expects a DateTime object, a unix timestamp, or a string that can parsed with strtotime(). Used in UTC timezone. 'modified_compare' => '<=' - operator for testing "modified". accepted values are '!=', '>', '>=', '<', '<=', '=' 'group' => '' - the group the action belongs to 'status' => '' - ActionScheduler_Store::STATUS_COMPLETE or ActionScheduler_Store::STATUS_PENDING 'claimed' => NULL - TRUE to find claimed actions, FALSE to find unclaimed actions, a string to find a specific claim ID 'per_page' => 5 - Number of results to return 'offset' => 0 'orderby' => 'date' - accepted values are 'hook', 'group', 'modified', or 'date' 'order' => 'ASC'

$return_format : string = OBJECT

  OBJECT, ARRAY_A, or ids

##### Tags

deprecated
  2.1.0

## Search results