Support

Home Forums Event Espresso Premium Event Espresso 4 and PayPal Pro Locale Code not passed to PayPal

Event Espresso 4 and PayPal Pro Locale Code not passed to PayPal

Posted: November 11, 2021 at 6:47 pm


Maskfitplus

November 11, 2021 at 6:47 pm

I have set up the Country for Canada and Provinces only in the EE4 in the Countries Tab.

Scenario Issue: When the event registration info is collected from the users, it does present Province and Postal Code field names as expected. However when I check off that I want to pay with “PayPal/credit card”, the content of these fields is moved forward, but the “Province” field name becomes “State” and the “Postal Code” field name becomes “ZIP” on the screen where the Credit Card info is required. We seem to be losing the PayPal locale code when presenting the screen for the credit card payment. Checked with PayPal, our account is set up properly.


Tony

  • Support Staff

November 12, 2021 at 9:24 am

Hi there,

I’m not sure what locale code you mean here as there is no locale setting for PayPal Pro, it will use whatever locale your site is set to use and then the translations for that locale.

Your site is set to en_CA which we don’t have translations so it will use default ‘en_US’ versions. In the registration form the question text can be manually set, but not on the payment method billing forms, so you’ll need some code to fix this.

I’m guessing you don’t need to translate any/many other strings on the site from the ‘US’ version?

You have a couple of options to fix this.

1. Load the en_US translations and rename the file so that it loads for en_CA, you can then just edit the PO/MO files whenever you need to ‘translate’ a string on the site. This is easier to manage when changing a lot of strings as you just manage/edit the PO file, generate the MO file and put it in the right location, but, translations do slow down the site a little.

2. Use a snippet of code to change the strings you need to. This needs a little PHP which you can edit to add more translations as needed and doesn’t slow down the site like PO/MO files do. This option is fine for a smaller number of changes but not easily managed when you start translating a lot of strings.

Right now I’d say go with #2 and you can do it with a snippet like the one here:

https://eventespresso.com/wiki/how-to-change-wording-with-poedit/#plugins

You could add the snippet at the bottom of that page to a custom functions plugin on your site, we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Then, update the $strings array to be something like this:

$strings = array(
        'State' => 'Province',
        'Zip' => 'Postal Code',
        // Add some more strings here
 );

Something like this:

https://gist.github.com/Pebblo/9696098ef39ef5174f924454ef97e728


Maskfitplus

November 13, 2021 at 9:48 am

Thank you I will have our developer look into these options.


Tony

  • Support Staff

November 15, 2021 at 2:50 am

You’re most welcome.

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso