Pavlo, here the code from:
/plugins/woocommerce-tm-extra-product-options/include/class-tm-epo-helper-base.php:494
I DONT have the Aelia plugin installed (and it never was installed).
What do you think?
public function get_currencies(){
$enabled_currencies = apply_filters(‘wc_aelia_cs_enabled_currencies’, array($this->wc_base_currency()));
if (class_exists(‘WOOCS’)){
global $WOOCS;
$currencies=$WOOCS->get_currencies();
if ($currencies && is_array($currencies)){
$enabled_currencies=array();
foreach ($currencies as $key => $value) {
$enabled_currencies[]=$value[‘name’];
}
}
}elseif (class_exists(‘WooCommerce_All_in_One_Currency_Converter_Main’)){
global $woocommerce_all_in_one_currency_converter;
$currency_data = $woocommerce_all_in_one_currency_converter->settings->get_currency_data();
if ($currency_data && is_array($currency_data)){
$enabled_currencies=array();
foreach ($currency_data as $key => $value) {
$enabled_currencies[]=$key;
}
}
}
return $enabled_currencies;
}
public function wc_aelia_cs_enabled_currencies(){
$enabled_currencies = $this->get_currencies();
$from_currency = $this->wc_base_currency();
foreach ($enabled_currencies as $key => $value) {
if($value==$from_currency){
unset($enabled_currencies[$key]);
break;
}
}
return $enabled_currencies;
}
public function wc_aelia_num_enabled_currencies(){
$enabled_currencies = $this->wc_aelia_cs_enabled_currencies();
if (is_array($enabled_currencies)){
return count($enabled_currencies);
}
return 0;
}