This thread is resolved. Here is a description of the problem and solution.
Problem:
After translating product category taxonomies, cusrev reviews are no longer displayed in the translated categories, showing "Keine Rezensionen vorhanden" instead. The synchronization of product categories does not resolve the issue.
Solution:
We recommend modifying the code in the Customer Reviews for WooCommerce plugin to ensure compatibility with WPML. Here are the steps:
1. Open the file at
...\wp-content\plugins\customer-reviews-woocommerce\includes\blocks\class-cr-reviews-slider.php
.
2. Navigate to line 156.
3. Replace the existing code block with the following:
} elseif ( has_filter( 'wpml_current_language' ) ) {<br /> // WPML compatibility<br /> global $sitepress;<br /> if ( $sitepress ) {<br /> remove_filter( 'comments_clauses', array( $sitepress, 'comments_clauses' ), 10, 2 );<br /> foreach ( $post_ids as $product_id ) {<br /> $trid = apply_filters( 'wpml_element_trid', NULL, $product_id, 'post_product' );<br /> $translationIds = apply_filters( 'wpml_get_element_translations', NULL, $trid, 'post_product' );<br /> foreach ( $translationIds as $translationID ) {<br /> $post_ids[] = (int) $translationID->element_id;<br /> }<br /> }<br /> $args['post__in'] = $post_ids;<br /> }<br />}After applying this change, reviews should display correctly across all translated categories.
Please note that this solution might become outdated or may not apply to your specific case. If the issue persists, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If needed, 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.
This topic contains 13 replies, has 0 voices.
Last updated by 2 months, 3 weeks ago.
Assisted by: Paola Mendiburu.
