Salta la navigazione

Resolved by author

Topic Tags: Compatibility

Overview of the issue

When the Customer Reviews for WooCommerce plugin by CusRev and its CusRev visual style are active, translated reviews aren’t shown as expected. Even after translating the review via WPML String Translation, the review displayed is not the translated version.

Workaround

Please, make sure of having a full backup of your site before proceeding.

  • Add the following code in your theme’s functions.php file:
    //Fix for compsupp-6829
    add_action ('the_comments', 'customer_reviews_remove_hooks', 1, 9);
    function customer_reviews_remove_hooks($comments) {
    	global $wp_filter;
    	foreach ($wp_filter["the_comments"]->callbacks[10] as $key => $value) {
    		if(str_contains($key, 'translate_product_ids')){
    			remove_filter( 'the_comments', $key, 10 );
    		}
    	}
    	return $comments;
    }
    

2 risposte a “Customer Reviews for WooCommerce - Translated Reviews Not Displayed with as Translated”

Lasciare una risposta

Ti preghiamo di rimanere in tema e di essere rispettoso nei confronti degli altri. Se hai bisogno di aiuto per questioni non correlate a questo post, utilizza il nostro Forum di supporto per avviare una chat o inviare un ticket.

Potete usare questi tag:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>