• Resolved acidburnsmk

    (@acidburnsmk)


    I’m using custom bank gateway that accept only “Macedonian denar” “MKD” – currency.

    Because I’m using 3 more currencies in woocommerce, using this code:

    add_filter( 'halk_amount_fix', function( $total ) { return $total * 62; } );

    EUR currency and every other currency are converted (multiplied) *62 after i “Place Order”

    For example:
    – I want to donate 50 EUR: https://prntscr.com/1381r46
    – my gateway accept only MKD (Macedonian denar)
    – on the gateway page the total amount is: 50*62= 3100 MKD , which is okey for EUR currency

    But if the currency on the order page is USD $, the exchange rate for USD/MKD is *50 , using the above code, 50 USD are converted same as EUR.

    How can i upgrade the function/filter to get currency first from the order, and if its USD to use *50 rate, if its EUR to use *62 rate, if its GBP to use *45 ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @acidburnsmk,

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Cheers!

    Thread Starter acidburnsmk

    (@acidburnsmk)

    @rainfallnixfig you can close/delete the topic.

    I solve the problem on stackoverflow.

    Cheers!

    Mirko P.

    (@rainfallnixfig)

    Hi @acidburnsmk,

    Thanks for letting us know you managed to find the solution! If you wish, you could also post the link to your question on Stack Overflow here so it can help other WooCommerce users that may experience similar difficulty.

    I’m marking this thread as resolved but if you have further questions, please feel free to open a new topic.

    Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Woocommerce convert order total to default currency after place order’ is closed to new replies.