WC_Countries::get_continents
Get all continents.
Method of the class: WC_Countries{}
Hooks from the method
Returns
Array.
Usage
$WC_Countries = new WC_Countries(); $WC_Countries->get_continents();
WC_Countries::get_continents() WC Countries::get continents code WC 10.3.6
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'];
}