add_action('woocommerce_single_product_summary', 'change_single_product_ratings', 2 );
function change_single_product_ratings(){
remove_action('woocommerce_single_product_summary','woocommerce_template_single_rating', 10 );
add_action('woocommerce_single_product_summary','wc_single_product_ratings', 5 );
}
function wc_single_product_ratings(){
global $product;
$rating_count = $product->get_rating_count();
if ( $rating_count >= 0 ) {
$review_count = $product->get_review_count();
$average = $product->get_average_rating();
?>
<div class="woocommerce-product-rating">
<div class="container-rating"><div class="star-rating">
<?php echo wc_get_rating_html( $average, $rating_count ); ?>
</div>
<?php if ( comments_open() ) : ?><a href="#reviews" class="woocommerce-review-link" rel="nofollow">(<?php printf( _n( '%s customer review', '%s customer reviews', $review_count, 'woocommerce' ), '<span class="count">' . esc_html( $review_count ) . '</span>' ); ?>)</a><?php endif ?></div>
</div>
<?php
}
}