*/ protected function get_currency_by_billing_country() { $billing_country = $this->get_billing_country(); $currency = WC_Aelia_Currencies_Manager::factory()->get_country_currency($billing_country); // If currency used in the billing country is not enabled, take the default // used for GeoIP if (!$this->is_valid_currency($currency)) { $currency = self::settings()->default_geoip_currency(); } // Debug //var_dump("CURRENCY BY BILLING COUNTRY: $currency"); return $currency; } /** * Indicates if currency selection by billing country has been enabled. * * @return bool */ protected function currency_by_billing_country_enabled() { return self::settings()->current_settings(WC_Aelia_CurrencySwitcher_Settings::FIELD_CURRENCY_BY_BILLING_COUNTRY_ENABLED, false); } } if (WC_Aelia_CurrencySwitcher::check_requirements() == true) { // Instantiate plugin and add it to the set of globals $GLOBALS[WC_Aelia_CurrencySwitcher::$plugin_slug] = new WC_Aelia_CurrencySwitcher(); } else { // If requirements are missing, display the appropriate notices add_action('admin_notices', array('WC_Aelia_CurrencySwitcher', 'plugin_requirements_notices')); }