WooCommerce showing star rating review instead of text review string
On my WooCommerce site I am trying to output the star rating for a product that is reviewed. Instead, it outputs this:
Rated 3.38 out of 5 based on 8 customer ratings
What am I missing with the following code?
$rating_count = $product-get_rating_count();
$review_count = $product-get_review_count();
$average = $product-get_average_rating();
echo wc_get_rating_html( $average, $rating_count );
When I switch from my custom theme to default WordPress theme, the ratings then show.
Topic woocommerce-offtopic review rating Wordpress
Category Web