• 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 / Account_API / Account_API::get_formatted_account_list()
Product: Virtual Events

Account_API::get_formatted_account_list( $active_only = false )

Get list of accounts formatted for options dropdown.

Contents

  • Parameters
  • Return
  • Source
  • Changelog

Parameters

$all_data

(boolean) (Required) Whether to return only active accounts or not.


Top ↑

Return

(TribeEventsVirtualMeetingsZoomarray<string,mixed>) An array of Zoom Accounts formatted for options dropdown.


Top ↑

Source

File: src/Tribe/Meetings/Zoom/Account_API.php

	public function get_formatted_account_list( $active_only = false ) {
		$available_accounts = $this->get_list_of_accounts( true );
		if ( empty( $available_accounts ) ) {
			return [];
		}

		$accounts = [];
		foreach ( $available_accounts as $account ) {
			$name  = Arr::get( $account, 'name', '' );
			$value = Arr::get( $account, 'id', '' );
			$status = Arr::get( $account, 'status', false );

			if ( empty( $name ) || empty( $value ) ) {
				continue;
			}

			if ( $active_only && ! $status ) {
				continue;
			}

			$accounts[] = [
				'text'  => (string) $name,
				'id'    => (string) $value,
				'value' => (string) $value,
			];
		}

		return $accounts;
	}

Expand full source code Collapse full source code


Top ↑

Changelog

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