ActionScheduler_Store::query_actions()
Query for action count or list of action IDs.
Method of the class: ActionScheduler_Store{}
No Hooks.
Return
String|Array|null
. The IDs of actions matching the query. Null on failure.
Usage
$ActionScheduler_Store = new ActionScheduler_Store(); $ActionScheduler_Store->query_actions( $query, $query_type );
- $query(array)
Query filtering options.
Default: array()
-
hook(string)
The name of the actions. Optional. -
status(string|array)
The status or statuses of the actions. Optional. -
args(array)
The args array of the actions. Optional. -
date(DateTime)
The scheduled date of the action. Used in UTC timezone. Optional. -
date_compare(string)
Operator for selecting by $date param. Accepted values are '!=', '>', '>=', '<', '<=', '='.
Default: '<=' -
modified(DateTime)
The last modified date of the action. Used in UTC timezone. Optional. -
modified_compare(string)
Operator for comparing $modified param. Accepted values are '!=', '>', '>=', '<', '<=', '='.
Default: '<=' -
group(string)
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.
Default: 5 -
offset(int)
The query pagination offset. -
orderby(int)
Accepted values are 'hook', 'group', 'modified', 'date' or 'none'.
Default: 'date' - order(string)
Accepted values are 'ASC' or 'DESC'.
Default: 'ASC'
-
- $query_type(string)
- Whether to select or count the results. Default, select.
Default: 'select'
Changelog
Since 3.3.0 | Introduced. |
Since 3.3.0 | $query['status'] accepts array of statuses instead of a single status. |
ActionScheduler_Store::query_actions() ActionScheduler Store::query actions code WC 9.3.1
abstract public function query_actions( $query = array(), $query_type = 'select' );