ActionScheduler_DBStore::query_actions()publicWC .

Query for action count or list of action IDs.

{} Это метод класса: ActionScheduler_DBStore{}

Хуков нет.

Возвращает

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

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

$ActionScheduler_DBStore = new ActionScheduler_DBStore();
$ActionScheduler_DBStore->query_actions( $query, $query_type );
$query(массив)
Query filtering options.
По умолчанию: array()
$query_type(строка)
Whether to select or count the results.
По умолчанию: select

Заметки

  • Смотрите: ActionScheduler_Store::query_actions for $query arg usage.

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

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

Код ActionScheduler_DBStore::query_actions() WC 6.9.4

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
}