ActionScheduler_Store::query_action()
Run query to get a single action ID.
Method of the class: ActionScheduler_Store{}
No Hooks.
Return
Int|null
.
Usage
$ActionScheduler_Store = new ActionScheduler_Store(); $ActionScheduler_Store->query_action( $query );
- $query(array) (required)
- Query parameters.
Notes
- See: ActionScheduler_Store::query_actions for $query arg usage but 'per_page' and 'offset' can't be used.
Changelog
Since 3.3.0 | Introduced. |
ActionScheduler_Store::query_action() ActionScheduler Store::query action code WC 9.3.1
public function query_action( $query ) { $query['per_page'] = 1; $query['offset'] = 0; $results = $this->query_actions( $query ); if ( empty( $results ) ) { return null; } else { return (int) $results[0]; } }