• Resolved crossmax

    (@crossmax)


    Hello.

    In the documentation I have read how to add a new currency.

    If I put this code into my functions.php but I get a typical error page “There has been a critical error on this website. Please check your site administrator’s email inbox for instructions.”

    How I can add new currency to ths plugin?

    Thank you

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Sabuj Kundu

    (@manchumahara)

    can you share your code via any code sharing site ?

    Thread Starter crossmax

    (@crossmax)

    I put directly into funtions.php child theme file.

    
    add_filter('cbcurrencyconverter_currency_list', 'cbcurrencyconverter_currency_list_extend');
    
    /**
     * Add New Currency support
     *
     * @param $currency_list
     *
     * @return mixed
     */
    public function cbcurrencyconverter_currency_list_extend($currency_list){
        if(!isset($currency_list['JOD'])){
            $currency_list['JOD'] = 'Jordanian Dinar';
        }
    
        return $currency_list;
    }
    
    

    This is the code i’m talking about, extracted from plugin documentation page. Where I put them? Can you explain with more details the process to add a currency?

    Thank you

    Plugin Author Sabuj Kundu

    (@manchumahara)

    Hi,
    I updated the documentation. you need to write

    ‘function cbcurrencyconverter_currency_list_extend’ in place of ‘public function cbcurrencyconverter_currency_list_extend’

    That means remove the ‘public’ keyword from function name. we had a small mistake in documentation.

    Thread Starter crossmax

    (@crossmax)

    Thanks. Now works great

    Plugin Author Sabuj Kundu

    (@manchumahara)

    you are welcome. I am closing this ticket then.
    Hope you will review the plugin as per your experience of using this https://www.ads-software.com/plugins/cbcurrencyconverter/#reviews

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to add new currency?’ is closed to new replies.