The code in this article is considered a customisation. As such, it's outside the scope of our support service. Should you need assistance implementing the code, please feel free to contact us to request a consultation.


You can alter the list of countries displayed on the widget with a simple filter, which you can put in your theme's functions.php file. You can find a sample filter below.    

/**
 * Alters the countries that will be displayed on the country selector widget.
 * 
 * @param array countries An array of country code => country name pairs.
 * @return array
 */
function my_countries($countries) {
  $countries['AU'] = 'My label for Australia';
  $countries['CA'] = 'My label for Canada';
 
  return $countries;
}
add_filter('wc_aelia_cs_customer_country_selector_widget_countries', 'my_countries', 10, 1); 

   

You can purchase the Currency Switcher from our online shop.