Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:

Customer Reviews for WooCommerce - the translated reviews are not shown when the plugin is active.

Solution:

It is a compatibility issue with the Customer Reviews for WooCommerce plugin. We have a workaround to solve this issue.

Copy and paste the following function in the functions.php file of your site's theme.

add_action ('the_comments', 'test_remove_hooks0', 1, 9);
function test_remove_hooks0($comments) {
    global $wp_filter;
    foreach ($wp_filter["the_comments"]->callbacks[10] as $key => $value) {
        if(str_contains($key, 'translate_product_ids')){
            remove_filter( 'the_comments', $key, 10 );
        }
    }
    return $comments;
}

Save the changes in the file.

The issue has been escalated to our developers.

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.

Our next available supporter will start replying to tickets in about 8.79 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 33 replies, has 3 voices.

Last updated by ivanK-23 10 months, 1 week ago.

Assisted by: Itamar.

Author Posts
April 10, 2023 at 7:17 am

ivanK-23

Hi, i want to translate reviews via string transaltion as you have described in your site. unfortunately not all reviews appear translated.

https://wpml.org/documentation/related-projects/woocommerce-multilingual/translating-and-displaying-product-reviews/ i follow this

but in some of the pages they do not appear translated.

Please check the following pages:

hidden link - here is page where reviews in bulgarian appear translated in english as they should (described in the WPML instructions)

hidden link - here is page where reviews in bulgarian DO NOT appear translated in english as they should (they just appear in bulgarian)

April 10, 2023 at 8:50 am
April 10, 2023 at 9:33 am #13436631

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

This issue is now escalated to our second-tier supporters. They will confirm it and, if needed, further escalate it to our developers.

I'll keep you updated here on any news regarding this issue.

Regards,
Itamar.

April 10, 2023 at 4:55 pm #13438857

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I've further checked things and discussed this issue with our second-tier supporter. The expected behavior is that translated reviews only show in the current language. Only untranslated reviews show in all the languages. And after I translated the reviews, it is working as expected on the original product in English and its Bulgarian translation.

hidden link
hidden link

Please see the attached screenshots en-review-trans.jpg and bul-review.jpg.

Still, the following two reviews are not showing the translation.

Получих го като подарък и мога да кажа, че е невероятно! Вече направих първото си пътуване в Италия с него и спокойствието което дава е незаменимо. Велурената торбичка също е много удобна и я ползвам за най-различни неща, когато не държа портмонето в нея. В началото малко ме стресна, че хартиеното ръководство което идва в портмонето е на англисйки, но после видях че има QR код който води до онлайн Българско ръководство за употреба. Много удобно. Препоръчвам го на всеки!

Портмонето е страхотно – красиво, здраво и практично! Идеален подарък за всеки, който обича да пътува.

I suspect this might be an issue with the Customer Reviews for the WooCommerce plugin we mentioned.

Do you have a staging site where we can continue investigating this issue without risking breaking your live site?

Regards,
Itamar.

en-review-trans.jpg
bul-review.jpg
April 13, 2023 at 2:36 pm #13465883

ivanK-23

Hi Itmar and thank you for your answer

No unfortuantely i do not have staging site, but i have a suggestion from where the problem might be. I will check it this weekend and update you as soon as try it!

April 13, 2023 at 2:45 pm #13465923

ivanK-23

I had time to try my suggestion now, but ubfortunately there is no connection.
What was my idea: as this plugin sends reviewewing emails to the buyers i though that all reviews that are not translatable are the reviews that are written vie these emails.

I activated the plugin Customer reviews as those "email reviews" are shown as verified owner but some of the verified owner reviews are translated others not...so i guess there is no connection there. (i hoped to find it, honeslty) the interesting part is that when i activated the plugin again, nothing changed. I mean that the translated reviews stayed translated and not transated stayed not transalated.

You can see all the reviews combined on this page here: hidden link

As for the staging site, i am not sure how to make one. Do you have any suggestions how can i coppy the current site to onether subdomain maybe?

Thanks again!

April 16, 2023 at 7:22 am #13480621

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, and thanks for the extra information.

Thanks for sending me the link to the main reviews page hidden link. It is my first time seeing you have such a page on your site. As I mentioned in my last reply, we have a problem with two reviews. In my last reply, I copied and pasted the reviews in Bulgarian, which were translated into Strings Translation, but the translations were not showing on this product page hidden link. However, now I can see that the translations of those reviews do show on the reviews page hidden link.

(translated from bulgarian) I received it as a gift and I can say that it is amazing! I have already made my first trip to Italy with it and the peace of mind it gives is irreplaceable. The velvet bag is also very handy and I use it for a variety of things when I'm not keeping my BulKey Code Wallet in it. At first I was a little surprised that the paper manual that comes in the wallet is in English, but then I saw that there is a QR code that leads to the online multi-language user manual. Very comfortable. I recommend it to everyone!

(translated from bulgarian) The wallet is great – beautiful, sturdy and practical! A perfect gift for anyone who loves to travel.

So this gave me an idea to try the following. I went to Products -> Reviews and pressed the "Quick Edit" option for these reviews. Then I pressed the "Update Comment" button. Please see the attached screenshot update-comment.jpg. I then refreshed the product page hidden link and could see that now the translations of the reviews are showing. Please see the attached screenshot comments-translated.jpg.

Can you please confirm that the problem is solved now?

Thanks,
Itamar.

update-comment.jpg
comments-translated.jpg
April 18, 2023 at 1:37 pm #13496277

ivanK-23

Hi itamar and thank you for your reply!

You havent seen this page because is only active when the customer reviews plugin is active and at the time we had our chat i had turned it off for debug purposes. No its active

Regarding these two reviews, yes i can second that they are translated. However i ntoice that other reviews appear not translated: hidden link (also check the screenshot)

Unfortuantely i cannot rememeber if they were translated at first place. To be sure for future i made a full screenshot of the translated an not translated reviews so i can follow more persisely what happens.

Please can you check if these reviews appear tranlated in your end?
Thanks

not transl.jpg
April 18, 2023 at 4:41 pm #13498327

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

What I see on my end is what you show on your screenshot. The reviews are in Bulgarian. Please see the attached screenshot.

2023-04-18_19-39-40.jpg
April 19, 2023 at 5:42 am #13501553

ivanK-23

I tried your suggestion for these comments but unfortunatelly i dont see any result. Could you try please as well?
Thanks!

April 19, 2023 at 6:35 am #13501763

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I'm consulting our second-tier supporters about this case. When I have their reply, I will update you here.

Thank you for your patience.
Itamar.

April 19, 2023 at 9:59 am #13503669

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Our second-tier supporter suggests removing the strings registered and re-running the troubleshooting action to re-register them and test if that helps. To do that, please proceed with the following steps.

1. Take a backup of your site in case something goes wrong.

2. Go to WPML -> Strings Translation and filter to show the reviews strings (wcml-reviews domain).

3. Select and delete the relevant strings (product-1042-review-80 | product-1042-review-36 | product-1042-review-27). (Before deleting the strings, you may want to save the translations on a side note).

4. Go to WooCommerce -> WooCommerce Multilingual & Multicurrency -> Settings, and press the 'Troubleshooting' link.

5. Select the 'Register product reviews for translations' option and press the 'Start' button. Wait for the process to finish.

6. Go back to Strings Translation. Those strings should be there again, but they will be untranslated. Translate the strings. (You can use the translations you saved.)
7. Check the product and see if now the strings are translated.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****

Please let me know how it went.

Regards,
Itamar.

April 19, 2023 at 2:27 pm #13505427

ivanK-23

Hi Itamar and thank you again.
so we have some kind of improvement. 2 out of 3 comments got translated. However one of them didnt and i have no idea why. I delelted all three of them end then tranlsated them back again in the same way. see pic1.

Also another thing that i noticed is that after i rescanned for the reviews in the troubleshooting section, after that some of the strings changed their language. You can see them on pic2. I noticed that the reviews that had no problem with the translating were actually the ones who got assigned in the wrong language in pic2. And the third review that is rightfully assigned to bulgarian after the scan it is not translated on the front end now (pic1)

Also another thing that i can noticed on pi2 are the two strings "Well made" and "супер измислено" - initially they are translation from one another and the bulgarian one is the first. I have no idea how the "Well made" string appeared its own here.

I am really trying to find some patterns here, and i am ready to try anyrhing that you suggest as well.

pic2.jpg
pic1.jpg
April 19, 2023 at 6:19 pm #13507353

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

This is indeed a strange case. It might be because of a third-party plugin. But at least I'm glad most of the problem is solved now.

For the review that still has this problem, please try switching the language of the string. You can learn how to do it by reading this article.

https://wpml.org/documentation/getting-started-guide/string-translation/how-to-change-the-source-language-of-strings/

Please let me know if it helps.

Regards,
Itamar.

April 27, 2023 at 8:00 am #13547109

ivanK-23

Sorry for my absence. I will try it and get back to you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.