Home › Forums › WoodMart support forum › Reviews › Reply To: Reviews
May 16, 2023 at 11:56 pm
#467469
Elise Noromit
Member
Hello,
Our developers have checked and see you have imported the comments incorrectly.
You need to import the comments correctly, then add this custom code to functions.php of the child theme:
add_filter( 'woocommerce_product_get_rating_counts', function ( $ratings ) {
if ( ! $ratings || ! is_array( $ratings ) ) {
return $ratings;
}
$new_ratings = array();
foreach ( $ratings as $index => $rating ) {
$new_ratings[ (int) $index ] = $rating;
}
return $new_ratings;
});
Best Regards