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: WCML
Related documentation:
This topic contains 4 replies, has 1 voice.
Last updated by Juan de Paco 4 weeks, 1 day ago.
Assisted by: Juan de Paco.
| Author | Posts |
|---|---|
| March 27, 2026 at 1:42 pm #17932468 | |
|
tadsikanS |
We noticed that in woocommerce-multilingual/inc/class-wcml-comments.php, the maybe_invalidate_comment_cache method is hooked to pre_get_comments and calls wp_cache_flush_group('comment-queries') on every product page load: phppublic function maybe_invalidate_comment_cache( $query ) { if ( 'product' === get_post_type( $product_id ) ) { Is this behavior intentional? Is there a reason the cache needs to be flushed on every product page load rather than only when a review is actually added or changed? |
| March 27, 2026 at 5:30 pm #17933068 | |
|
Juan de Paco Supporter |
Hello. Thanks for reaching out and for the detailed report. I am raising this directly to our development team to review. We recently conducted an analysis against our WCML plugin and object cache, and this logic was introduced as a result - I am getting our development team involved and we will check it as soon as possible. Until I get a response, you may want to disable the whole logic by commenting out the line 80 of the file that you referenced: //add_action( 'pre_get_comments', [ $this, 'maybe_invalidate_comment_cache' ] ); I can not state if there can be some side effect of this workaround, to be honest, until I get some feedback from our development team. You might experience some comments not appearing right after they are created, or even some mismatch between the language of the content being visited and the comments being displayed. I will update here once I know more. Thanks. |
| March 30, 2026 at 3:59 am #17935042 | |
|
tadsikanS |
Thank you Juan. I can confirm that your hotfix worked and the situation stabilized. Please kindly keep us posted on a long-term solution so we don't have to rely on commenting out that specific line. I think the issue might unknowingly slow down a lot of websites from many of your customers, and it is quite hard to identify this problem, so your help in escalating this to the devs is much appreciated. |
| May 8, 2026 at 2:45 pm #18023328 | |
|
tadsikanS |
Hello Juan, is there any news from your devs on this matter? |
| May 8, 2026 at 3:48 pm #18023474 | |
|
Juan de Paco Supporter |
Hello Our development team included it into their list of tasks for the current development cicle, so we can push a fix for the issue in the next release for WCML. Unfortunately, the release date is still not defined, so I can not provide you with a good estimation - it should probably land by the end of this month or early next one, but do take this with a pinch of salt. If there happens to be any WCML release earlier than that, I am monitoring the task so I make sure it gets included. Regards. |
