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.

Our wait time is higher than usual, please make sure you are meeting the minimum requirement - https://wpml.org/home/minimum-requirements before you report issues, and if you can take a look at current Known Issues - https://wpml.org/known-issues/. Thank you.
Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

This topic contains 25 replies, has 1 voice.

Last updated by Giulio 1 hour, 30 minutes ago.

Assisted by: Bruno Kos.

Author Posts
April 3, 2025 at 2:44 pm #16893143

Giulio

Our in-house developer has found a workaround.

We realised that creating a new comment record in the database wouldn’t have helped—so we gave it some more thought.

We then traced the WPML functionality responsible for registering missing reviews and ended up pinpointing the exact function that looks for them via a query.

We studied it and made the necessary adjustments, and that’s how we managed to identify the truly missing reviews—specifically, those containing emoticons.

If you believe this could help improve WPML and make it a bit more “intelligent,” we’re happy to share the modified code. However, just to be clear, this solution came at a cost, since our developer is a paid freelancer. So we’d really appreciate receiving at least some translation credits in return for contributing to the improvement.

While we were carrying out further checks, we also noticed that WPML completely ignores replies to reviews. For instance, if we receive a negative review and want to reply to it, WPML doesn’t scan those responses at all.

Is that something you’re aware of?

April 4, 2025 at 7:00 am #16895280

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

We don’t have any policies in place for exchanging code suggestions for credits or similar arrangements. All changes go through our internal development team, who review, test (including conducting code checks and consistency tests), and ensure everything meets our standards before anything is considered for a future release. It’s never a matter of simply making a change and pushing it live.

I created an internal ticket for this.

As for the other issue, can you show me this here?
hidden link

Not sure I understand what does not show and where, in the Translation Management?

April 4, 2025 at 7:49 am #16895609

Giulio

I applied the modification to the woocommerce-multilingual\classes\Reviews\Translations\Mapper.php file by replacing the query in the getUnregisteredReviews function from:

$q = "SELECT c.comment_ID, c.comment_post_ID, c.comment_content, c.comment_type, tr.language_code, st.name, st.value
FROM {$this->wpdb->comments} AS c
LEFT JOIN {$this->wpdb->prefix}icl_translations AS tr
ON tr.element_id = c.comment_post_ID AND tr.element_type = 'post_product'
LEFT JOIN {$this->wpdb->prefix}icl_strings AS st
ON c.comment_content = st.value
AND st.context = '" . FrontEndHooks::CONTEXT . "'
WHERE c.comment_type = '" . FrontEndHooks::COMMENT_TYPE . "'
AND st.name IS null";

to:

$q = "
SELECT comment_ID, comment_post_ID, comment_content, comment_type, null as language_code, null as name, null as value
FROM {$this->wpdb->comments}
WHERE comment_ID NOT IN (
SELECT comment_ID
FROM {$this->wpdb->comments} c
LEFT JOIN {$this->wpdb->prefix}icl_strings s on concat('product-',c.comment_post_ID,'-review-',c.comment_ID) = s.name
WHERE s.context = '" . FrontEndHooks::CONTEXT . "'
)
AND comment_type = '" . FrontEndHooks::COMMENT_TYPE . "'
";

Please go ahead and run your own tests. As a reminder, this is how we got WPML to finally detect all reviews containing emoticons.

Regarding replies to negative reviews, we discovered that our responses are actually classified as comments—not reviews. LOL! That’s why WPML doesn’t recognise them at all.

So the question now is: if we manage to get WPML to treat these replies to negative reviews as strings and have them appear in the String Translator, will WPML be able to handle them properly?

April 4, 2025 at 10:41 am #16896921

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

If you manage to get them into the String Translation (reviews are to be translated through Translation management), translation should work. Let me know if otherwise.

Because the translation of comments was never implemented:
https://wpml.org/forums/topic/how-to-translate-post-comment-also/#post-15156129

April 7, 2025 at 6:59 am #16902444

Giulio

The support cleanup robot is asking me for an update. However, there isn’t one at the moment – we need more time to figure out how to proceed. We’d rather ask if, in light of everything we’ve discussed, you’re considering taking any steps to resolve the issue or improve the underlying system.

April 7, 2025 at 7:49 am #16902605

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

We tried to debug the sandbox but we weren't able to.

What about this?
https://wpml.org/forums/topic/updating-existing-strings/#post-16886921

This can help us move forward, so to try scanning your site for missing reviews and see why it fails.

April 7, 2025 at 8:56 am #16902988

Giulio

Hi Bruno, the sandbox is pointless in this case because the installation is recent. The issue is believed to occur with an older installation with a WPML that’s been around for years—just like ours.

That said, we managed to resolve the issue using the code I sent you. So even if you were to investigate further, I doubt you’d uncover much. Don’t you have any older sites you could take a look at?

After all, you mentioned that this is a known issue that’s been observed before: reviews containing emoticons aren’t being taken into account.

Unfortunately, I don’t think I can help you any further.

However, I’d be interested to know whether you think it would be worthwhile to reflect on the matter of replies to reviews, which currently aren’t considered. Honestly, that’s quite baffling, don’t you think?

When someone leaves you a bad review on TrustPilot, do you respond or just ignore it and leave the customer hanging?

April 7, 2025 at 11:29 am #16903869

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

The issue with replies, is it about replies to reviews that were added after WPML was configured but they don't show in the Translation Management?

Because this is what I observe - If I add review directly to hidden link it will not be recognized in Translation Management, only if I add it directly on hidden link

April 7, 2025 at 2:04 pm #16904876

Giulio

I can’t access the sandbox—it’s asking me for a username and password.

April 8, 2025 at 6:10 am #16906829

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

This is the auto login URL:
hidden link

April 9, 2025 at 8:08 am #16911845

Giulio

I ran a test—but I see you had already done the same. When replying to a review, the string isn’t imported. I replied to another review, and the exact same thing happened.

So the issue is real: WPML doesn’t handle replies to reviews. And yet, negative reviews happen—and it’s important to be able to respond to them. And if we’re using WPML to translate reviews into other languages, it only makes sense to be able to translate the replies too.

Don’t you think?

Could you please forward this to the relevant team?