WC_Countries::get_continents()publicWC 1.0

Get all continents.

Method of the class: WC_Countries{}

Hooks from the method

Return

Array.

Usage

$WC_Countries = new WC_Countries();
$WC_Countries->get_continents();

WC_Countries::get_continents() code WC 9.4.2

public function get_continents() {
	if ( empty( $this->geo_cache['continents'] ) ) {
		/**
		 * Allows filtering of continents in WC.
		 *
		 * @since 2.6.0
		 *
		 * @param array[array] $continents
		 */
		$this->geo_cache['continents'] = apply_filters( 'woocommerce_continents', include WC()->plugin_path() . '/i18n/continents.php' );
	}

	return $this->geo_cache['continents'];
}