• Resolved janez33

    (@janez33)


    Hello, I’m writing to report issue we are having with paypal not receiving proper locale from Braintree for WooCommerce Payment Gateway plugin.
    We are using Braintree account for multiple domains and sites with different country domain. We are using only one account for this.
    So for example on checkout for french site your plugin finds proper locale fr_FR as you can see from the screenshot https://imgur.com/a/AHKYLdq. But the problem is paypal is not receiving that locale and is forcing it to en_GB which is not the way as it should be. I saw function in your plugin get_safe_locale but the problem is I don’t know if you are sending proper locale to paypal. I also try to force locale with this function as you told me wc_braintree_paypal_locale but without any success. So maybe I’m wrong but it seems like the issue is on you side. For example on slovenian pages it’s forcing en_GB, in your function safe_locale there is no option for slovenian language locale.
    I found out that if I change src url in iframe (locale.x=en_GB to locale.x=fr_FR) it loads the correct locale for paypal button –> screenshot https://imgur.com/a/dpIusqe

    Please help us solve the problem ??

    Regards,

    Janez

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Janez ( @janez33 )!

    Thanks so much for reaching out to us here. I’m not certain if we’re passing the locale, so let me check with a colleague here and I’ll come back to you as soon as possible with more information here.

    Thanks!

    Julie ??
    SkyVerge

    Hi Janez ( @janez33 )!

    Thanks for your patience here. We do list the locale as one of the parameters we pass to the button. It does call get_safe_locale, as you’d mentioned, which pulls the locale from the WP site itself. If it’s not found, it would default to en_US, so is it possible your site’s locale is set to en_GB?

    Thanks for any other details here!

    Julie ??
    SkyVerge

    Thread Starter janez33

    (@janez33)

    Hello,

    no, we have site’s locale set to fr_fr as you can see html lang attribute on our checkout page. As I stated before your plugin finds correct locale which is seen from this screenshot https://imgur.com/a/AHKYLdq But it seems like it’s not sending correct locale to paypal and it seems like it’s not sending locale to paypal from get_safe_locale function. If you check on our checkout page iframe with class=”zoid-component-frame zoid-visible” (which is iframe generated by your plugin) you can see in src attribute in URL that locale.x which I guess is part of a request parameter for paypal button you can clearly see that locale is locale.x=en_GB.

    Hi Janez. ( @janez33 )

    That’s quite strange! Thank you so much for pointing that out to me specifically.

    I’m checking with my team here about this and will come back with more as soon as I can.

    Thank you!

    Julie ??
    SkyVerge

    Hi Janez! ( @janez33 )

    Thanks so much for your patience here. I had a colleague investigate and here’s what it seems is happening:

    While we do pass the locale, this is not necessarily respected by PayPal/Braintree. The locale will be automatically set to whatever the default is for your merchant account. It’s in Account Options in your PayPal account, but it’ll be dependent on the buyer’s account first, I’m told.

    Essentially, the site locale looks like it’ll only be used if no other locale can be determined.

    Would you please let me know if that helps out here, Janez?

    Thank you so much!

    Julie ??
    SkyVerge

    Hey Janez! ( @janez33 )

    It’s been a while since we heard from you, so I’m going to mark this topic as resolved.

    If you’re still experiencing issues that I didn’t address in my last response, would you please take a look at our documentation for more information and create a new thread if you have further questions?

    Thanks very much!

    Julie ??
    SkyVerge

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Paypal button locale/language not working, paypal button is not translated’ is closed to new replies.