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
- 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 10:00 – 17:00 -
- 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 18:00 – 19:00 -

Supporter timezone: Asia/Kathmandu (GMT+05:45)

This topic contains 13 replies, has 2 voices.

Last updated by Shekhar Bhandari 3 months, 2 weeks ago.

Assisted by: Shekhar Bhandari.

Author Posts
September 3, 2024 at 7:51 am #16134256

nikolaosM

Background of the issue:
The issue we are facing is with Woo Gift Cards plugin. In the gift card received mail there are some strings added by the Woo plugin that do not appear as translated. We are able to translate them in string translation from English to Greek, but they do not appear as translated in the email hidden link. We have tried adding this to our functions.php: $option_key = 'woocommerce_gift_card_received_settings'; add_filter('option_' . $option_key, [wpml_st_load_admin_texts(), 'icl_st_translate_admin_string']); and this to WPML Custom XML settings: . We also contacted WooCommerce support team and they recommended to use Loco Translate along with your plugin. Is this safe to do? Let us notify you that we have open communication with the gift cards plugin authors so if you have any question for them let us know. They are also saying that there should be no problem since the strings are translatable. Also, everything in the site is up to date since yesterday.

Symptoms:
What we get now is strings added by the plugin to not appear as translated in Greek.

Questions:
Is it safe to use Loco Translate along with WPML?
Why are the translated strings not appearing in the email?

September 3, 2024 at 8:02 am #16134327

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I wouldn't recommend using loco translate as this has not been tested yet.

Can you follow the below steps and see if helps?

- Go to WPML->Strings Translations->Auto Register strings for translations
- Enable the "Look for strings while pages are rendered" option
- Check if the emails shows correctly

Further, can you make a small change on the email content and re-translate it to see if it works?

Look forward to your reply.

Thanks

September 3, 2024 at 8:37 am #16134499

nikolaosM

Hello Shekhan,

After enabling "Look for strings while pages are rendered" the email was showen as it sould be hidden link. After deactivating it the issue came back hidden link.

We have already tried changing something in the email content and it did not solve our problem. We have also tried to reset the translations by making small changes there and reseting them, but it did not work also.

Thanks!

September 4, 2024 at 7:35 am #16138713

nikolaosM

Hello,

We added the snippet in our functions.php file. Then refreshed the WPML string tranlations page and the gift card page in the front end. Then removed the snippet, made an order of a gift card and the issue is not fixed.

Thanks!

September 4, 2024 at 7:47 am #16138743

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

To debug this issue further, I would need to check your site settings once, for this I would need temporary access (wp-admin and ftp) to your site.

So could you please provide me with those details, you will find the needed fields for this below the comment area when you log in to leave your next reply.
hidden link

This info is private and available to you and WPML supporters only.
Read more about this: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Note:
Backup your sites before providing the credentials or if possible provide credentials for the test site

Look forward to your reply.

Thanks

September 4, 2024 at 8:36 am #16139039

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I will be unable to check the issue without making changes, as it's required for debugging, so please create a backup and let me know once I can make changes.

Further, can you provide me steps to reproduce the error, can we send an test email from the backend?

Look forward to your reply.

Thanks

September 4, 2024 at 8:49 am #16139206

nikolaosM

Hello,

What changes are you willing to make?

Thanks!

September 4, 2024 at 11:16 am #16139964

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

I would need to change the settings of the plugins, texts, delete strings and re-translate it in first place.

September 9, 2024 at 7:58 am #16154264

nikolaosM

Hello Shekhar,

I will need you to tell me exactly what changes you want to make and in what plugins in order to allow you to proceed.

In order to recreate the issue visit this page hidden link. It is the page of the greek gift card. In order to complete a purcase you will need to activate the bank deposit from woocommerce settings because we only have virtual payment methods active. After you make an order you go and deactivate bank deposit from woocommerce payment settings and update your order as completed to receive the email.

Please do not leave the bank deposit payment method active for to long.

Thanks!

September 9, 2024 at 8:23 am #16154413

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

It will be very hard to tell you the exact steps, to make things easier I suggest creating a test site, Debugging this will require modifying things here and there.

Also, I suggest you to delete the email strings once and re-translate it to see if it helps.

Look forward to your reply.

Thanks

September 9, 2024 at 8:28 am #16154422

nikolaosM

Hello Shekhar,

We had tried in the past to recrate the same issue in our demo site and a demo site one of your colleges had created and the issue was solved by adding the snippets we provided to our first message. We are only able to see the issue in the live site.

What you are suggesting is that we delete the strings, scan the plugin and translate them again?

Thanks!

September 9, 2024 at 8:29 am #16154425

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello 🙂

Yes, and since the plugin options are added in English language, I suggest you to translate the email texts from English to other languages.

Let me know how it goes.

September 9, 2024 at 9:33 am #16154918

nikolaosM

Hello,

We deleted, scaned the plugin and translated the strings and it did not solve the problem. We changed the language of the strings to Ukrainian and we are still getting the default language strings hidden link. We think that the problem has to do with the strings rendering. If you remember when we activated Look for strings while pages are rendered the problem was solved so we suggest to find a solution with this in mind.

Thanks!

September 9, 2024 at 10:38 am #16155313

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

To make it easier to test this without affecting the site, I have created a public test site here, can you install the gift card plugins and see if you can replicate the issue here: hidden link

To test emails I have enabled email logs plugins and you can see email contents there.

Look forward to your reply.

Thanks

The topic ‘[Closed] Woocommerce Gift Card received email is not translating the strings created by the plugin’ is closed to new replies.