Skip to content Skip to sidebar

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

Problem:
The client reported that each time they duplicated a single product to another language for manual translation, all product reviews were deleted.

Solution:
We recommended two workarounds:
1. Navigate to WooCommerce > WooCommerce Multilingual & Multicurrency > Settings and disable the option "By default, show reviews in all languages".
2. Alternatively, edit the file

wp-content/plugins/woocommerce-multilingual/inc/class-wcml-comments.php

. Around line 209, replace the code

if ( $this->is_reviews_in_all_languages( $obj->query_vars['post_id'] ) ) {

with the following code

if ( $this->is_reviews_in_all_languages( $obj->query_vars['post_id'] ) && !isset( $_REQUEST["action"] ) ) {

We emphasized the importance of backing up the database and website before making any changes.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please open a new support ticket.

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 8 replies, has 3 voices.

Last updated by Long Nguyen 1 year, 4 months ago.

Assisted by: Long Nguyen.

Author Posts
March 5, 2024 at 4:18 pm #15375508

sebastiaanV-11

Each time I duplicate our single product to another language (to translate manually with ChatGPT), all product reviews are deleted.

Each time I add a new language to the shop, I duplicate the product we have (just one) for manual translation. But each time I duplicate it all product reviews are deleted from the product and I need to back up the WP_comments and commentmeta tables to restore them.

March 5, 2024 at 5:07 pm #15375792

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

Before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process.

We would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link

Please, let me know if you need any additional details. Have a nice day.

March 5, 2024 at 5:07 pm #15375793

sebastiaanV-11

I was just about to share login information and then Mateus just randomly changed this into a ticket. Very weird.

March 5, 2024 at 5:09 pm #15375794

sebastiaanV-11

I cannot share credentials. Please reactive it. Thanks.

March 5, 2024 at 5:11 pm #15375797

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Please check if the fields are visible now.

Thank you, please let us know.

March 7, 2024 at 6:42 am #15382318

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

After trying some troubleshooting steps on your site, I see the issue persists. I will take a backup of your site, restore it on my local host and investigate the issue further.

Thanks.

March 8, 2024 at 3:36 am #15387250

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I got some information from our 2nd tier support: there are two workarounds to fix the issue on your site:

1. Go to WooCommerce > WooCommerce Multilingual & Multicurrency > Settings > Disable option " By default, show reviews in all languages".

2. Or edit the file wp-content/plugins/woocommerce-multilingual/inc/class-wcml-comments.php. Around line 209, replace the code

if ( $this->is_reviews_in_all_languages( $obj->query_vars['post_id'] ) ) {

with this one

if ( $this->is_reviews_in_all_languages( $obj->query_vars['post_id'] ) && !isset( $_REQUEST["action"] ) ) {

❌ IMPORTANT: Please backup your database and website before proceeding ❌

Looking forward to your reply.
Thanks

March 15, 2024 at 1:24 pm #15414613

sebastiaanV-11

I have updated the PHP file and will test this once we're adding a new language. Thank you

March 18, 2024 at 1:47 am #15419040

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Let me know if you have any questions.

Thank you.