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.

Tagged: 

This topic contains 12 replies, has 2 voices.

Last updated by quynh-nhuT 1 year, 1 month ago.

Assisted by: Mohamed Sayed.

Author Posts
October 18, 2023 at 2:49 pm #14605913

quynh-nhuT

Hello, I would like to translate the elements on my "YITH WooCommerce Product Add-ons".

I went to the string translation to translate but I see the following (see screenshot) => all the strings that I would like to translate are in FR but it is actually the contrary... How can I change/reverse it ?

thanks in advance for your help !

Screenshot 2023-10-18 at 16.47.07.png
October 19, 2023 at 6:56 am #14610881

Mohamed Sayed

Hi there,
Thanks for contacting WPML support.

You can change the source language of strings by selecting them and then clicking the "Change the language of selected strings" button.

Please check this doc for more info: https://wpml.org/documentation/getting-started-guide/string-translation/how-to-change-the-source-language-of-strings/

Kind regards,
Mohamed

Screenshot_243.png
October 19, 2023 at 8:56 am #14612767

quynh-nhuT

Thanks for your quick reply ! Indeed, I was able to change the language. However, I thought that after translating this (see my screenshot), I would see the translation in EN but still... it is not appearing:
in FR: you can see the weeks that we can select => hidden link
When you change in EN: hidden link => no week appears...

Do I miss something else ?
I went to "localisation de plugin" => Should I do something with the "create a po file" ? (see my screenshot)

Thanks for your help !

Screenshot 2023-10-19 at 10.55.11.png
Screenshot 2023-10-19 at 10.52.30.png
October 19, 2023 at 4:23 pm #14617833

Mohamed Sayed

Hi,

I couldn't check any of the pages you shared because the site is down due to a critical error hidden link

I suggest enabling the WordPress debug.log, this will allow you to see if any PHP errors are being produced. More Info: https://wordpress.org/support/article/debugging-in-wordpress/

To enable it, open your wp-config.php file and look for:

define('WP_DEBUG', false);

And change it to:

define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
// Disable display of errors and warnings which is recommended on a live site.
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);

Then visit the site and check if any errors were saved to the debug.log file inside the /wp-content/ directory.

October 19, 2023 at 4:45 pm #14618055

quynh-nhuT

Yes, I am sorry for that... I am trying to figure it out...I just did what you say and I went to the debug.log file => I see that this is something linked with the "Shipping" but I don't know what to do now... I will contact my webhosting for that...

In the meantime, you can go to my backup site, which is the same...

Indeed, I was able to change the language. However, I thought that after translating this (see my screenshot), I would see the translation in EN but still... it is not appearing:
in FR: you can see the weeks that we can select => hidden link
When you change in EN: hidden link => no week appears...

Do I miss something else ?
I went to "localisation de plugin" => Should I do something with the "create a po file" ? (see my screenshot in the previous discussion)

October 19, 2023 at 5:38 pm #14618313

quynh-nhuT

ok, the website is restored 😉 so you can ignore my previous message.

Here are the link:

Indeed, I was able to change the language. However, I thought that after translating this (see my screenshot), I would see the translation in EN but still... it is not appearing:
in FR: you can see the weeks that we can select => hidden link
When you change in EN: hidden link => no week appears...

Do I miss something else ?
I went to "localisation de plugin" => Should I do something with the "create a po file" ? (see my screenshot in previous discussions)

Thanks for your help !

October 20, 2023 at 6:36 am #14620611

Mohamed Sayed

Hi,

1. Are those global options or created per product?

2. I would need to request temporary access (WP-Admin) so I can investigate this issue further.
– preferably to a test site where the problem has been replicated if possible –

Your next answer will be private, which means only you and I have access to it.

❌ Please backup your database and website before providing us with access details ❌

If you don't see the form below, please don't add your credentials as they will be publicly exposed:
hidden link

Privacy and Security when Providing Debug Information for Support:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Thanks for your cooperation

October 20, 2023 at 7:52 am #14621269

Mohamed Sayed

I don't think this is an issue with the label translations because the options are not showing in the secondary language.

Please create a full backup and try the workaround mentioned here: https://wpml.org/forums/topic/yith-add-on-plugin-options-dont-show/#post-12937409

October 20, 2023 at 8:03 am #14621325

quynh-nhuT

I went to the file manager and in line 282, I didn't find the code line:

$included_product_check = in_array( (string) $product_id, (array) $block->get_rule( 'show_in_products' ), true );

I also did a search and nothing corresponds to this line of code...

October 20, 2023 at 4:41 pm #14626139

Mohamed Sayed

I see that the code was already added by the author in another file, this might be another compatibility issue.

I have created this clean sandbox setup on our servers here:
hidden link
(one-click login)

I would need you to please set up WPML + the WPML add-ons as you have them on your site (they are already installed) and to also install the theme/plugin and try to recreate the issue

Please don't install anything else like plugins that are not necessary, on a clean sandbox we try to use just the WPML plugins and the plugin/theme that's part of the issue

If the issue is going to take place on this clean setup on our servers too, then I can forward this to our compatibility department.

Please let me know how that goes and what you are able to find.

October 21, 2023 at 8:28 am #14627861

quynh-nhuT

Hello, I replicated my store (in a simpliest way of course) and here, is it working => the "YITH WooCommerce Product Adds-on options" box with the selected weeks is showing in both languages...

=> See in EN: hidden link
=> See in FR: hidden link

1/ I went back to my website and tried to deactivate my plugins to troubleshoot the issue, but nothing changes...
2/ So I am quite lost... could you please help me ? Is there any configuration in WPML that I did wrong in my store ?

Thanks in advance for your help !

October 21, 2023 at 10:14 pm #14629771

Mohamed Sayed

Hi,
Sorry for the late reply due to the weekend.

I checked the sandbox site and your test site again then I was able to find the reason for this issue.

On sandbox, you set the options block to "show on all products which make it appear in all languages hidden link

On your test site, you set this option to show on specific French product categories hidden link

To fix this, you need to add the translated version of the category to the display rule settings as you can see here: hidden link

Please follow these steps:

1. Go to YITH > Product Add-ons & Extra Options > Edit the options block
2. Switch to English from the top admin bar
3. Add the translated version of the category/product to the display rule
4. Save the changes

Kind regards,
Mohamed

Screenshot_249.png
October 23, 2023 at 7:51 am #14633643

quynh-nhuT

Thanks a LOT for your help, it is indeed resolved now ! Thanks, really appreciated !

I have another question, also linked to the product category in FR and EN that I need to select. I am using YayMail from YayCommerce to customize my confirmation email after a purchase.
They have 2 "views": one in FR, one in EN.
In the view in FR, see screenshot, I want to display a text section based on a condition: if the the product category = "particulier".
In the view in EN, see screenshot, it's the same but the product category needs to be called "private" (already translated in WooCommerce Multilingual section) BUT I don't see it in the list => it seems that the translation in EN is not available (see screenshot).

Can you help me on this ?

Thanks a lot!

in EN.png
in FR.png
October 24, 2023 at 7:07 am #14642741

quynh-nhuT

Hi, I just found the solution, I needed to switch to the EN dashboard ;-). Thanks a lot for your help !