WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] The currency symbol for China Yuan is incorrect (18 posts)

  1. solagirl
    Member
    Posted 1 year ago #

    Hi,

    I found a problem when chose the China Yuan as the default currency. Instead of displaying the correct symbol "¥", the £ symbol is given.
    Can this be fixed?

    Thank you!

    http://wordpress.org/extend/plugins/woocommerce/

  2. royho
    Member
    Posted 1 year ago #

    Yes, they need to fix that. But for now use this -> http://wcdocs.woothemes.com/snippets/add-a-custom-currency-symbol/

  3. solagirl
    Member
    Posted 1 year ago #

    Thank you, I will go with your suggestion.

  4. mikejolley
    Member
    Plugin Author

    Posted 1 year ago #

  5. solagirl
    Member
    Posted 1 year ago #

    @mikejolley Thank you for the link, I can see now it is a RMB & CNY issue.

  6. solagirl
    Member
    Posted 1 year ago #

    The latest version fixed the problem, great!

  7. durichitayat
    Member
    Posted 1 year ago #

    Sorry, the latest version fixed the RMB symbol but it is presented to Paypal as $ USD

    Still buggy would love to see this fixed.

  8. solagirl
    Member
    Posted 1 year ago #

    Hi,
    I also found the problem that @durichitayat mentioned. It seems that the WooCommerce Multilingual plugin can fix this problem, however, it requires WPML to run.

    I think WooCommerce is simply lack of the function of converting currency. I'd love to see this function being added.

  9. durichitayat
    Member
    Posted 1 year ago #

    Hey Solagirl...

    Good to know. I will try this. Thx!

  10. durichitayat
    Member
    Posted 1 year ago #

    Still the same problem. Anyone come up with a solution that doesn't require Multilingual? I'd love to know :-)

  11. solagirl
    Member
    Posted 1 year ago #

    You might want to try other payment methods like alipay which support RMB, paypal simply doesn't support it

  12. durichitayat
    Member
    Posted 1 year ago #

    @solagirl: Thx! Alipay is a good 2nd option but the client is insisting on using Paypal :-/ ...

    Prehaps I'll try making the price a JS Variable setting the global currency in USD then mask the USD price by converting it to RMB on the fly. Obviously this isn't optimal though.

    Has anyone tried this before and/or recommend a snippet that should try for this?

    THX!

  13. solagirl
    Member
    Posted 1 year ago #

    add_filter('woocommerce_paypal_args', 'convert_rmb_to_usd');
    function convert_rmb_to_usd($paypal_args){
        if ( $paypal_args['currency_code'] == 'RMB'){
            $convert_rate = 6.2116;
            $paypal_args['amount_1'] = round( $paypal_args['amount_1'] / $convert_rate, 2);
        }
        return $paypal_args;
    }

    The snippet above can fix paypal problem with RMB symbol, one can either set the $convert_rate manually, or try to get it updated from somewhere automatically.

  14. lukaszb
    Member
    Posted 1 year ago #

    I accept payment in HKD (Hong Kong Dollars).
    How can I convert RMB to HKD in paypal?

  15. solagirl
    Member
    Posted 1 year ago #

    I think you can try something like this, put it in your theme's functions.php

    add_filter('woocommerce_paypal_args', 'convert_rmb_to_hkd');
    function convert_rmb_to_hkd($paypal_args){
    if ( $paypal_args['currency_code'] == 'RMB'){
    $convert_rate = 0.8; //set the converting rate
    $paypal_args['currency_code'] = 'HKD'; //change RMB to HKD
    $paypal_args['amount_1'] = round( $paypal_args['amount_1'] / $convert_rate, 2);
    }
    return $paypal_args;
    }

  16. lukaszb
    Member
    Posted 1 year ago #

    @solagirl THX! It's work.

  17. solagirl
    Member
    Posted 1 year ago #

    The code I provided earlier was found a bug, it does not work when there are more than one product in the cart. So here is an updated version. It takes care the condition of multiple products and converts shipping cost.

    add_filter('woocommerce_paypal_args', 'convert_rmb_to_usd');
    function convert_rmb_to_usd($paypal_args){
        if ( $paypal_args['currency_code'] == 'RMB'){
            $convert_rate = 6.2116; //Set converting rate
            $count = 1;
            while( isset($paypal_args['amount_' . $count]) ){
                $paypal_args['amount_' . $count] = round( $paypal_args['amount_' . $count] / $convert_rate, 2);
                $count++;
            }
        }
        return $paypal_args;
    }
  18. araleivan
    Member
    Posted 1 year ago #

    Ive also found this problem with my RMB base currency web shop - as soon as customers try to use Paypal the RMB price is replaced with $USD.
    @lukaszb Did the snippet provided completely fix this issue? Surely it requires weekly updates of the USD>RMB conversion rate?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.