Tribe__Languages__Locations::get_country_based_on_code( string $country_code )

Get a country name based on a country code.


Parameters

$country_code

(string) (Required) A 2-digit country code.


Top ↑

Return

(string) The full country name.


Top ↑

Source

File: src/Tribe/Languages/Locations.php

	public function get_country_based_on_code( $country_code ) {
		// Get the country code of the venue.
		$country_code = strtoupper( $country_code );

		// Get the country array from Tribe Common.
		$countries = $this->get_countries();

		return $countries[ $country_code ] ?? $country_code;
	}

Top ↑

Changelog

Changelog
Version Description
5.2.1 Introduced.