Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 11 replies, has 2 voices.

Last updated by Long Nguyen 1 year, 10 months ago.

Assisted by: Long Nguyen.

Author Posts
June 16, 2023 at 9:43 am #13838135

Daniel

Hi Daniel,

Error when creating a PayPal subscription using Gravity Forms Multilingual.

I have created a form in Spanish and translated it to Basque using the Gravity Forms Multilingual addon.

1) In Spanish language it works correctly but when I change to Basque language it returns an error.

You can see on this video: hidden link

create_order_error
Object { err: "i.application_context is undefined", timestamp: "1686909025129", referer: "www.paypal.com", sdkCorrelationID: "f2300612e9613", sessionID: "uid_72f9c1bf22_mdk6ndu6mty", clientID: "AXAvbNd_H9HjXExUOChV8-iq0YQw5OPB2CqyZmnjj2A633bacsLypTlgAX_Z0v-95wexwV9HPF-_PM2z", env: "production", buttonSessionID: "uid_dd410aee33_mdk6nta6mty", buttonCorrelationID: "f4948400fcfc9", time: "1686909025129", … }

buttonCorrelationID: "f4948400fcfc9"

buttonSessionID: "uid_dd410aee33_mdk6nta6mty"

clientID: "AXAvbNd_H9HjXExUOChV8-iq0YQw5OPB2CqyZmnjj2A633bacsLypTlgAX_Z0v-95wexwV9HPF-_PM2z"

env: "production"

err: "i.application_context is undefined"

referer: "www.paypal.com"

sdkCorrelationID: "f2300612e9613"

sessionID: "uid_72f9c1bf22_mdk6ndu6mty"

time: "1686909025129"

timestamp: "1686909025129"

token: null

user_id: "uid_dd410aee33_mdk6nta6mty"

<prototype>: Object { … }
buttons:1465:139238

June 16, 2023 at 12:16 pm #13839295

Daniel

The URL in Basque: hidden link
In spanish: hidden link

Debug log return this:

2023-06-16 11:50:25.239686 - DEBUG --> Gravity_Forms\Gravity_Forms_PPCP\PayPal_Subscriptions_Handler::prepare_subscription_request(): $feed => {"id":"5","form_id":"7","is_active":"1","feed_order":"0","meta":{"feedName":"Cuota socio Anual PayPal","transactionType":"subscription","recurringAmount":"form_total","subscription_type":"service","billingCycle_length":"1","billingCycle_unit":"year","recurringRetry":"1","recurringTimes":"0","ppcpSubscriptionPlanID":"P-5K820045FV517105DMSE5RIQ","ppcpSubscriptionPlanIDCurrency":"EUR","ppcpSubscriptionProductID":"PROD-3TM26640WD7741145","setupFee_enabled":"0","trial_enabled":"0","trialPrice_product":"free_trial","trialPrice_amount":"","trialPeriod_length":"1","trialPeriod_unit":"day","no_shipping":"1","delay_gravityformsmailchimp":"1","feed_condition_conditional_logic_object":{"conditionalLogic":{"actionType":"show","logicType":"any","rules":[{"fieldId":"8","operator":"is","value":"AS\u00d3CIATE"},{"fieldId":"55","operator":"is","value":"40,00 Anual"},{"fieldId":"31","operator":"is","value":"PayPal"}]}},"feed_condition_conditional_logic":"1","billingCycle":"","setupFee":"","trial":"","trialPrice":"","trialPeriod":"","options":"","post_payment_actions":"","conditionalLogic":"","trial_product":"free_trial","trial_amount":""},"addon_slug":"gravityformsppcp","event_type":null} 
2023-06-16 11:50:25.239794 - DEBUG --> Gravity_Forms\Gravity_Forms_PPCP\PayPal_Subscriptions_Handler::prepare_subscription_request(): $submission_data => {"form_title":"Donaci\u00f3n o Asociaci\u00f3n","email":"","address":"","address2":"","city":"","state":"","zip":"","country":"","payment_amount":0,"setup_fee":0,"trial":0,"line_items":[],"discounts":[]} 
2023-06-16 11:50:25.239871 - DEBUG --> Gravity_Forms\Gravity_Forms_PPCP\PayPal_Subscriptions_Handler::maybe_create_product(): Using existing product. 
2023-06-16 11:50:25.240140 - ERROR --> Gravity_Forms\Gravity_Forms_PPCP\PayPal_Subscriptions_Handler::maybe_create_plan(): Unable to init plan. 
June 19, 2023 at 4:09 am #13846683

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Daniel,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

It could be a compatibility issue between the Gravity Forms addon (Gravity Forms PayPal Checkout Add-On) and WPML, we will address that by reporting this to the compatibility team.

To be able to report the compatibility issues we need to replicate the issue on a clean installation. I created a clean installation of WordPress, WPML, and all necessary WPML add-ons. You can access the WordPress dashboard using the link below:
hidden link

Kindly follow the steps below:

- Install Gravity Forms and its addon plugin (Gravity Forms PayPal Checkout Add-On)
- Try to replicate the issue.
- Then let me know the steps to replicate it.

This will help us to report the issue to the compatibility team and solve the possible problem faster.

Look forward to your reply.
Thanks

June 19, 2023 at 6:21 pm #13854039

Daniel

Hello,

Thank you for your reply. Creating a duplicate is not an easy task since the website is on a multisite.
Also I would need to link the Sanbox to PayPal.
I will try to replicate as little as possible this week.

Would it be possible for you to access the site in production and review it?

I look forward to hearing from you
best regards

June 20, 2023 at 2:15 am #13855105

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

The addon plugin Gravity Forms PayPal Checkout Add-On is not available in our list of compatible plugins, which you can check here https://wpml.org/plugin/
So in order to investigate the issue further, we need to replicate the issue on a clean installation. I also help you to set up a sandbox PayPal account on the sandbox site.

Please let me know after you can replicate the issue and steps to do that. Thanks.

June 20, 2023 at 9:46 am #13857729

Daniel

Hello Long,

I have managed to replicate the complete fomularo and its translation. I have also activated the thema we are using.

As you can see in the following link the form in spanish works correctly, but when changing to esukera it doesn't work.

Sanbox hidden link

When selecting the fields corresponding to the conditions for payment with PayPal, the button does not change and the payment is not activated.

See video:hidden link

In the production website, the conditionals that activate the payment button do work, but then generate an error.

thanks

June 21, 2023 at 2:56 am #13863557

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I try to create a test form or duplicate your form and test the issue again but don't see that issue. Then I remove all the conditions of the PayPal Checkout in the form settings and see it works properly, please check this screenshot hidden link

Can you please re-add the PayPal Checkout condition one-by-one and see what causes the issue? It could be better if you can replicate this in the English language.

Thanks.

June 21, 2023 at 8:47 am #13865627

Daniel

Hello,
It is possible that I have not explained the problem properly.

In the form you created: Donation or subscription (TEST) (ID 3)

1. I have updated the form to English language (as you ask).

2. I have configured the PayPal Checkout module, with the necessary conditionals to show the PayPal payment.

3. I have created all the payment feeds with their conditionals for a donation or subscription.

hidden link
hidden link

4. I have completed the translation of the form by WPML/translations/

As you can see the form works correctly in the original language:

hidden link

The problem is that when I change the language, the PayPal payment system does not activate.

hidden link

I think the problem may be that when translating the fields the PayPal Checkou conditionals do not work correctly.

See video: hidden link

Thanks again and I hope this explanation can help to find the solution faster.

June 22, 2023 at 2:55 am #13872395

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I think the issue happens because the conditional logic in the PayPal Checkout Feed is not copied to the translation form. The workaround to fix this issue is to remove some feeds in the screenshot hidden link
because you have conditional logic to show the PayPal field when editing the form.
Two conditional logic for a field is not necessary, in my opinion.

However, I'm asking our 2nd tier support about this issue and update you here when I have something to share.

Thanks.

June 23, 2023 at 6:56 am #13881949

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I got a workaround from our 2nd tier support to fix this issue. When creating the choices of some select fields, please click on Show Values then add the value for the choice.
In ATE, please don't translate the value with another value keep the same in the original language, just translate the label. And re-create the conditional logic in the PayPal Checkout Feed again.

Please check this screenshot hidden link

Look forward to your reply.
Thanks

June 28, 2023 at 7:07 am #13907017

Daniel

Hello,

If I understand correctly in the form translator I have to keep the "value" and "rule" options the same in all languages.

I am going to test in my form in production, I see that in the sanbox it works.

Thanks

June 28, 2023 at 8:49 am #13908289

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Yes, correct. You should keep the "value" the same in all languages.

Let me know how it goes.

The topic ‘[Closed] Error when creating a PayPal subscription using Gravity Forms Multilingual.’ is closed to new replies.