Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello

    BACS is Payment system?

    Please explain in detail how you use the settings that it does not work.
    It is better to make a video with plug-in settings and error process

    Thread Starter karimun

    (@karimun)

    hi pavlo,

    yes BACS is payment system

    It seems that this plugin does not play nice:
    “Woocommerce Extra Product Options”
    https://codecanyon.net/item/woocommerce-extra-product-options/7908619

    Maybe you can give me a rapid hint only by looking at the Error.Log:

    `[25-Aug-2016 11:14:23 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_currencies() on null in /var/www/vhosts/mydomain.com/httpdocs/wp/wp-content/plugins/woocommerce-tm-extra-product-options/include/class-tm-epo-helper-base.php:494
    Stack trace:
    #0 /var/www/vhosts/mydomain.com/httpdocs/wp/wp-content/plugins/woocommerce-tm-extra-product-options/include/class-tm-epo-helper-base.php(515): TM_EPO_HELPER_base->get_currencies()
    #1 /var/www/vhosts/mydomain.com/httpdocs/wp/wp-content/plugins/woocommerce-tm-extra-product-options/include/class-tm-epo-builder-base.php(1897): TM_EPO_HELPER_base->wc_aelia_cs_enabled_currencies()
    #2 /var/www/vhosts/mydomain.com/httpdocs/wp/wp-content/plugins/woocommerce-tm-extra-product-options/include/class-tm-epo-builder-base.php(699): TM_EPO_BUILDER_base->add_element(‘textarea’, Array)
    #3 /var/www/vhosts/mydomain.com/httpdocs/wp/wp-content/plugins/woocommerce-tm-extra-product-options/include/class-tm-epo-builder-base.php(59): TM_EPO_BUILDER_base->init_elements()
    #4 /var/www/vhosts/mydomain.com/httpdocs/wp in /var/www/vhosts/mydomain.com/httpdocs/wp/wp-content/plugins/woocommerce-tm-extra-product-options/include/class-tm-epo-helper-base.php on line 494

    Thread Starter karimun

    (@karimun)

    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;
    }

    Thread Starter karimun

    (@karimun)

    Pavlo,

    what I did is changing the class name to something nonesense in get_currencies() .. and now the refund per item works. ??

    class_exists(‘WOOCS_INACT’)

    Do you recommend another, more elegant way?

    Hello

    Now you simply disable woocs in this function! We can not be responsible for the code that is out of plugin woof.
    If it works it’s a good way)))

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Currency Switcher breaks partial refunds’ is closed to new replies.