• Home
  • Knowledgebase
  • DevDocs
  • Translations
  • Support
  • Live Preview

logo DevDocs

By The Events Calendar
Filter by type:
Skip to content
Filter by type:
Search
Browse: Home / Classes / Abstract_Account_Api / Abstract_Account_Api::get_list_of_accounts()
Product: Virtual Events

Abstract_Account_Api::get_list_of_accounts( boolean $all_data = false )

Get the listing of Accounts.

Contents

  • Parameters
  • Return
  • Source
  • Changelog

Parameters

$all_data

(boolean) (Optional) Whether to return all account data, default is only name and status.

Default value: false


Top ↑

Return

(TribeEventsVirtualIntegrationsarray<string|TribeEventsVirtualIntegrationsstring>) $list_of_accounts An array of all the accounts.


Top ↑

Source

File: src/Tribe/Integrations/Abstract_Account_Api.php

	public function get_list_of_accounts( $all_data = false ) {
		$list_of_accounts = get_option( $this->all_account_key, [] );
		foreach ( $list_of_accounts as $account_id => $account ) {
			if ( empty( $account['name'] ) ) {
				continue;
			}
			$list_of_accounts[ $account_id ]['name'] = $account['name'];

			// If false (default ) skip getting all the account data.
			if ( empty( $all_data ) ) {
				continue;
			}
			$account_data = $this->get_account_by_id( $account_id );

			$list_of_accounts[ $account_id ] = $account_data;
		}

		return $list_of_accounts;
	}

Expand full source code Collapse full source code


Top ↑

Changelog

Changelog
Version Description
1.9.0 Introduced.
The Events Calendar
  • Home
  • Products
  • Blog
  • Support
© 2026 The Events Calendar Terms and Conditions Privacy