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.

This topic contains 10 replies, has 3 voices.

Last updated by Marcos Vinicios Barreto 5 months, 1 week ago.

Assigned support staff: Marcos Vinicios Barreto.

Author Posts
April 26, 2019 at 11:26 am

martinV-32

Dear support,

I have a problem with string translation of emails sent by the plugin: "Abandoned Cart Pro for WooCommerce". I reached to their support and they replied this, see below:

-------------------------------------------------------------------------------
We've checked the issue today and please find below the updates:

1. Our plugin tracks the cart language as soon as a product is added to the cart.
2. This scenario is working fine on your site, so if a user starts adding products to the cart in the Czech language or the Slovak language it works fine.
3. However, we then update the language again on the Checkout page as there are instances when users switch languages.
4. This is where the issue is occurring. Our plugin uses the WPML constant `ICL_LANGUAGE_CODE` to track the cart language.
5. This constant is supposed to return the current language on the page. Even when I'm on hidden link it returns the language as 'en' instead of 'cs'.
6. We alternatively tried to use the WPML API filter `wpml_current_language`, but that filter also returns the wrong language.
7. We've tried replicating this issue with an identical setup on our staging servers including using the same language, but the constant as well as the filter both return the value as 'cs' and not 'en'.
8. This leads us to believe that there's some minor difference in the setup on both the sites.
9. While we tried looking at the pages etc, we're no experts at WPML and could not find the difference.

Another thing that I noticed is that our staging site uses WooCommerce Multilingual v4.6.0, whereas the version currently active on your site is 4.5.0. I request you to kindly try updating the plugin to the latest version and see if it helps to fix the issue.

If the issue is replicated even with the latest version, it might be a good idea to get in touch with the WPML support team to find out the root cause of the issue. Below are some details which the WPML team need to know about:

1. The constant `ICL_LANGUAGE_CODE` returns the language fine on the shop and product pages.
2. However, it returns the site base language and not the current language on the Checkout page. hidden link
3. Alternatively, we tried using the filter `wpml_current_language` as `$current_user_lang = apply_filters( 'wpml_current_language', NULL );`, but it returns the site base language on the Checkout page.
4. Since both the methods return the base language, it leads us to believe it might be a setup issue.

We'd appreciate it if you could keep us updated on the response received from the WPML support team as we'd like to keep our plugin 100% compatible with WPML. Please let us know if you need any sort of assistance from our end in explaining the issue further to the WPML team.

Please feel free to get in touch with us for any further queries.

Ticket: hidden link
-------------------------------------------------------------------------------

Could you please lookt at this issue and tell me how to solve it?

Thank you.

If you have trouble logging to WP admin, there is .htaccess restriction for IP addresses. Login details for it:

name: cms
pass: cms

April 26, 2019 at 8:49 pm #3693271

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

Thank you for contacting us. I would be very happy to help you but I didn't fully understand what is the issue.

What steps should I follow to see the email sent? Do I have to wait a few hours or just close the cart page and the email is sent?

Please, could you tell me the step by step that I must follow to try to replicate the problem and check the email sent?

Thank you.

April 29, 2019 at 5:15 am #3699995

martinV-32

Hello,

The emails are sent when a user abandone a checkout. You need to add to cart a goods, proceed to checkut, fill in at least your email address and then leave it.

After that the sequence of 4 emails is send to you.

These emails should be in the language the you abandoned a checkout but it is only sent in english.

Try e.g. Czech language version, do the step above and still, the emails will we sent to you in english even thought it is translated in string translation.

Please look at the issue.

Thank you.

May 1, 2019 at 3:28 am #3715829

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

Sorry for the delay and thanks for the step by step. I noticed that, just as Abandoned Cart Pro support mentioned, you are using several outdated plugins, including WooCommerce, WooCommerce Multilingual, and WPML plugins. It should be important to update all of your plugins to more accurately check if there is any compatibility issue in any later version of WCML.

I'll check the problem you are reporting, and soon I'll contact you.

Thank you.

May 1, 2019 at 5:10 am #3716031

martinV-32

Hello,

We tried to update all the plugins and the issue was still there. Also when we updated Woocommerce to the latest version, the web stoped woring correctly (there is a warning that majority of our plugins were not tested with the latest version of Woocommerce).

Please look at the issue and tell us how to fix that.

Thank you.

May 3, 2019 at 5:17 am #3730899

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

I'm testing your site and I kept an abandoned cart, but I did not receive any emails after a few hours from your site.

Also, I have tested the plugin in our testing environment, but I also do not receive any email in either language.

Please, could you test the problem in our testing environment so we can check? To access our testing environment just go to this link: hidden link. Emails sent and received can be viewed in the "Email Log" menu within our testing environment.

If you need to use a "customer" user, I created this user: "client" with password: 123456. URL: hidden link

Please note that in order for us to fix the problem, we must first have to replicate it. Even in your testing environment, I do not receive any email from "Abandoned Cart Pro".

Thank you.

May 3, 2019 at 7:45 am #3731715

martinV-32

Hello,

I tried it in our environment and it works (email has been sent) - see the screen.

In your environment a tried it, too. The order has been registered as abandoned, but the email has not been sent.

Did you add to cart the goods, proceeded to checkout, filled email address and left?

I did these steps and it worked for me.

May 5, 2019 at 7:21 am #3741923

martinV-32

Hello,

We get another feedback from the plugin support that says this:

------------------------------------------------------------------
Since we haven't heard back from you on the issue you are facing, we have contacted the WPML support team to help us find the root cause of the issue. But the WPML support guys did not respond to our email yet. So yesterday, we were again checking this issue. We did some research to find any clue regarding this issue and we have found a setting "Language filtering for AJAX operations" available in the WPML plugin at WPML -> Languages.
Screenshot: hidden link

We think that enabling this setting can solve this problem on your website. Kindly enable this setting "Language filtering for AJAX operations" on your other websites and check whether you are receiving the abandoned cart reminder email in another language or not in which the cart is abandoned?

Please check and let us know the result.

Ticket: hidden link
------------------------------------------------------------------

We enabled "Language filtering for AJAX operations" and now it works!

The only problem that occurred is in HU version - The email is in right language but the email subject is in SK language.

Check the screens - everything is translated in WPML string translation and in CZ, ENG, SK language there is no problem.

Could you please help us with that?

May 7, 2019 at 7:49 pm #3761661

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for the updates and sorry for the delayed reply. I took a closer look in your website and noticed you have different email templates for different time set. Do you see the same issue for all the templates defined in your WordPress Dashboard > WooCommerce > Abandoned Carts > Templates? Do you see the same issue when using other language for example the Czech language? If not, chances are you still need to translate some options fields of your plugin settings. Please, let me know these details. Have a nice day.

May 8, 2019 at 7:36 am #3764335

martinV-32

Hello,

We have translated all the templates and all the fields (subject, text of email etc.).

the issue seems to be random, sometimes there is mistake in Czech language and in another email it is ok, sometimes in Hungary language and in another email it is ok.

We do not really know what causes the issue, because it does not behave the same all the time even though we do not make any changes.

May 9, 2019 at 1:09 am #3771747

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for the updates. It is really complex to debug such issue when it behaves randomly. Do you see the same behavior in the sandbox environment? If it happens even in our sandbox environment then we can conclude this is plugin has some compatibility issue. Please, confirm if you see the same behavior in the sandbox environment before we take a final conclusion and look for a solution. Thank you for your collaboration and patience, have a nice day.