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.
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.
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?
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?
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.
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.
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?
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
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?