WordPress at Your Fingertips
function is not described

ActionScheduler_DBStore::query_actions() public WC .

Query for action count or list of action IDs.

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

No Hooks.


String|Array|null. The IDs of actions matching the query. Null on failure.


$ActionScheduler_DBStore = new ActionScheduler_DBStore();
$ActionScheduler_DBStore->query_actions( $query, $query_type );
Query filtering options.
Default: array()
Whether to select or count the results.
Default: select


  • See: ActionScheduler_Store::query_actions for $query arg usage.


Since . Introduced.
Since x.x.x $query['status'] accepts array of statuses instead of a single status.

Code of ActionScheduler_DBStore::query_actions() WC 6.1.1

public function query_actions( $query = array(), $query_type = 'select' ) {
	/** @var wpdb $wpdb */
	global $wpdb;

	$sql = $this->get_query_actions_sql( $query, $query_type );

	return ( 'count' === $query_type ) ? $wpdb->get_var( $sql ) : $wpdb->get_col( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.NoSql, WordPress.DB.DirectDatabaseQuery.NoCaching