/** * Gets the active currency using the billing country. * * @return string */ 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; }