ActionScheduler_Store::query_actions()publicWC 3.3.0

Query for action count or list of action IDs.

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

Хуков нет.

Возвращает

Строку|Массив|null. The IDs of actions matching the query. Null on failure.

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

$ActionScheduler_Store = new ActionScheduler_Store();
$ActionScheduler_Store->query_actions( $query, $query_type );
$query(массив)

Query filtering options.

По умолчанию: array()

  • hook(строка)
    The name of the actions. Optional.

  • status(строка|массив)
    The status or statuses of the actions. Optional.

  • args(массив)
    The args array of the actions. Optional.

  • date(DateTime)
    The scheduled date of the action. Used in UTC timezone. Optional.

  • date_compare(строка)
    Operator for selecting by $date param. Accepted values are '!=', '>', '>=', '<', '<=', '='.
    По умолчанию: '<='

  • modified(DateTime)
    The last modified date of the action. Used in UTC timezone. Optional.

  • modified_compare(строка)
    Operator for comparing $modified param. Accepted values are '!=', '>', '>=', '<', '<=', '='.
    По умолчанию: '<='

  • group(строка)
    The group the action belongs to. Optional.

  • claimed(true|false|int)
    TRUE to find claimed actions, FALSE to find unclaimed actions, an int to find a specific claim ID. Optional.

  • per_page(int)
    Number of results to return.
    По умолчанию: 5

  • offset(int)
    The query pagination offset.

  • orderby(int)
    Accepted values are 'hook', 'group', 'modified', 'date' or 'none'.
    По умолчанию: 'date'

  • order(строка)
    Accepted values are 'ASC' or 'DESC'.
    По умолчанию: 'ASC'
$query_type(строка)
Whether to select or count the results. Default, select.
По умолчанию: 'select'

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

С версии 3.3.0 Введена.
С версии 3.3.0 $query['status'] accepts array of statuses instead of a single status.

Код ActionScheduler_Store::query_actions() WC 8.7.0

abstract public function query_actions( $query = array(), $query_type = 'select' );