• Hi, this is great, solved my issue on Metical (Mozambique)to be avaiable on store (instead of adding code on fuctions.php of my theme folder, this is a more elagant way and also convert to my Paypal USD payments.

    Meanwhile I found a bug on code on conversion.
    When I try to do payment (store in Metical), it converts to USD using the conversion rate propely but Paypal returns this error:

    “The link you have used to enter the PayPal system contains an incorrectly formatted item amount.”

    But it is a simple trick to fix this. Thus paypal only accept amounts with 2 decimal places. So you can correct you code with a round function as per below:

    ***FIX:
    On file woocommerce-custom-currencies/woocommerce-custom-currencies.php, go to function apply_conversion( $paypal_args ) {

    Replace from:

    $paypal_args[ $key ] = $value * floatval( $conversion_rate );

    to:
    $paypal_args[ $key ] = round($value * floatval( $conversion_rate ),2);

    That’s it ??

  • The topic ‘Great’ is closed to new replies.