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.

No supporters are available to work today on this forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

Tagged: 

This topic contains 7 replies, has 2 voices.

Last updated by Osama Mersal 1 year, 5 months ago.

Assisted by: Osama Mersal.

Author Posts
June 1, 2023 at 3:52 pm #13756247

lobkeB

Hi,

On the product page the default behavior of WPML is to show Woocommerce reviews in the currently active language only. So on the product page this language thing works correctly.

But on a 'normal' page WoocCommerce reviews are shown in all languages. Is it possible to show the currently active language only?
For example, on this page only the english reviews should be shown: hidden link

Many thanks.

Best regards,

Lobke Buijs

June 4, 2023 at 9:41 am #13765553

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Lobke,

Thanks for contacting WPML forums support. I'll be glad to help you today.

First of all, sorry for the late reply due to a higher workload. Please go to WooCommerce Multilingual-> Settings tab, and disable the "By default, Allow review in all languages" option.

If that didn't help, please login to this sandbox site and install the CusRev plugin. (hidden link)

After that, please try to replicate the issue. If the issue is replicable, please let me know the steps to reproduce the issue.

Best regards,
Osama

June 5, 2023 at 8:28 pm #13774537

lobkeB

hi Osama,

Thanks for your assistance.

The first solution (WooCommerce Multilingual-> Settings tab, and disable the "By default, Allow review in all languages" option) does not do the job unfortunately. (It is disabled on my site).

The second solution:
I created 1 product, translated it in 2 languages.
I created 1 test page (and translated it) with the short code [cusrev_all_reviews] in order to show all reviews and to replicate the issue. Unfortunate the shortcode [cusrev_all_reviews] does not work. I don't understand why, it should work.

On the Sandbox site the issue below appears (but on my live site this problem does not appear):
Only on the product page of the default languages the reviews are shown. So on this default product page (english version) you see all the reviews. But the reviews by the french client should not be shown: page hidden link

this is the french version of this page (no reviews are shown on this page): hidden link

I do have my website in a test environment. I can give you acces to that site if you need to?

Thanks for your help!

Best regards,
Lobke

June 6, 2023 at 8:37 am #13776257

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Lobke,

I enabled the shortcodes. Please check the page and confirm that the sandbox shows the same issue you face on your site. (hidden link)

Thanks,

June 6, 2023 at 2:25 pm #13779693

lobkeB

Hi Osama,

Yes, I can confirm you that the sandbox shows the same issue I face on my site.

June 6, 2023 at 3:12 pm #13780083

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for your confirmation. I've consulted our compatibility team, and I'll update you as soon as I get their reply.

Best regards,

June 6, 2023 at 4:48 pm #13780763

lobkeB

Thank you!

June 15, 2023 at 7:50 am #13829997

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for your patience. Our compatibility team has found a workaround to fix the issue. Kindly check the following steps:

1- Edit the (/wp-content/plugins/customer-reviews-woocommerce/includes/blocks/class-cr-all-reviews.php) file
2- Replace the following code at line 230

} elseif ( has_filter( 'wpml_current_language' ) ) {
// WPML compatibility
global $sitepress;
remove_filter( 'comments_clauses', array( $sitepress, 'comments_clauses' ), 10, 2 );
}

With

}

As you can see, we are just deleting the condition added by the author. I've applied these steps to the sandbox site. Please check it and let me know if it works correctly.

Best regards,
Osama

The topic ‘[Closed] Show only the CusRev reviews in the active language’ is closed to new replies.