New currencies

This topic contains 17 replies, has 6 voices, and was last updated by  Stiofan O’Connor 7 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #171

    ridgebackbg
    Free User
    Post count: 95

    Hi, guys!

    The currencies are very limited in the standard plug-in.
    Is there a way to add new ones, besides coding?

    Thanks!
    Alex

    #172

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Alex,

    What currencies do you feel are missing?
    Not all payment gateway support all currencies.

    Stiofan

    #173

    ridgebackbg
    Free User
    Post count: 95

    You are right, Stiofan, although the Bank transfer supports them all 😉

    I could code in an additional one, but probably will have to do it after every update.
    I believe it will be easy for you to add the full list and let the customers choose.

    Please, consider also the below for the future improvements (regarding the gateways):

    Although not all the gateways support all the currencies, it would be nice if one could easily convert to an accepted currency through a conversion rate (either static or updated regularly from ECB, let’s say) and send the gateway the accepted one. The rest is an accounting department matter, but probably the private seller wouldn’t even think about it further.

    I had done it with geodir_payment_manager (and probably will do it here as well), but honestly, I would really like to avoid re-coding after every update…

    I hope you’ll think it over someday 🙂

    Cheers,
    Alex

    #178

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I have added a task for this. 🙂

    Thanks,

    Stiofan

    #284

    Umer Alam
    Free User
    Post count: 2

    Hi.
    I am using this plugin in Pakistan. I dont need online payment gateway but I need to create my invoices in My Local Currency PKR which is not found in this plugin.. Is is possible to add the PKR Currency in your pluging.

    #285

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Umer,

    If you replace this file then it will show PKR
    https://github.com/AyeCode/invoicing/blob/master/includes/wpinv-helper-functions.php

    Thanks,

    Stiofan

    #326

    DR
    Free User
    Post count: 78

    Hi Stiofan,
    We were trying to get some currencies working so we asked on the GD forum and Paolo sent us here. Reading this thread, it appears you are already working on something, which is great. But what can we do (quick fix) to add the Nigerian and Ghanaian currencies (for starters) please?

    Thing is, the exchange rates are very steep and if we publish listing prices with so many zeros behind a $ sign, well, the customers will blow chunks. And we would like to avoid that.

    Thank you

    DR

    #327

    Kiran
    Moderator
    Post count: 7069

    Hi DR,

    In next release there are some more currencies available.

    Till next release you can use following code snippet to add currencies support of GHS & NGN. Add this code in your theme functions.php or via any snippet code.

    
    
    /* Add new currencies Invoicing plugin */
    function _wpi_custom_currencies( $currencies ) {
        $currencies['GHS'] = __( 'Ghanaian Cedi', 'your_textdomain' );
        $currencies['NGN'] = __( 'Nigerian Naira', 'your_textdomain' );
    
        return $currencies;
    }
    add_filter( 'wpinv_currencies', '_wpi_custom_currencies', 10, 1 );
    
    function _wpi_custom_currency_symbols( $symbols ) {
        $symbols['GHS'] = '₵';
        $symbols['NGN'] = '₦';
    
        return $symbols;
    }
    add_filter( 'wpinv_currency_symbols', '_wpi_custom_currency_symbols', 10, 1 );

    Kiran

    #334

    DR
    Free User
    Post count: 78

    Thank you Kiran, Works great.

    DR

    #340

    jolanacb
    Buyer
    Post count: 12

    Hi Kiran,

    Could you please provide a code snippet to add Costa Rican Colones CRC?

    It looks pretty straight forward, but just to be sure.

    Thank you,
    Jolana

    #347

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Jolana,

    You can copy the example above, all you need to know is the 3 letter currency name and the icon code.

    Thanks,

    Stiofan

    #401

    jolanacb
    Buyer
    Post count: 12

    Hi Stiofan,

    I added the code via code snippet plugin, but I do not see the added currency under Invoicing > General > Currency Settings drop down for currency. Not sure why, can you please assist? I already have packages priced in dollar, but I presume I can change after I am able to add and change the CRC currency. This is a new site and need to change the currency before going live.

    Thank you,
    J

    #404

    Kiran
    Moderator
    Post count: 7069

    Hi Jolana,

    Can you show me which code snippet you have used?

    Kiran

    #405

    jolanacb
    Buyer
    Post count: 12

    Hi Kiran,

    function _wpi_custom_currencies( $currencies ) {
    $currencies[‘CRC’] = __( ‘Costa Rican Colon’, ‘your_textdomain’ );

    return $currencies;
    }
    add_filter( ‘wpinv_currencies’, ‘_wpi_custom_currencies’, 10, 1 );

    function _wpi_custom_currency_symbols( $symbols ) {
    $symbols[‘CRC’] = ‘₵’;

    return $symbols;
    }
    add_filter( ‘wpinv_currency_symbols’, ‘_wpi_custom_currency_symbols’, 10, 1 );

    Thanks,
    Jolana

    #406

    Kiran
    Moderator
    Post count: 7069

    Hi Jolana,

    Check now i have corrected snipped code on your site. Now currencies list shows “Costa Rican Colon” currency.

    I have corrected single quote in snippet code and activated it and new currency back in list.
    You have used single quote

    instead of

    '

    Kiran

Viewing 15 posts - 1 through 15 (of 18 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket