Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // wc star rating shows
- // step one: woocommerce->settings>product->check box enable star rating
- // step two: in section class="woocommerce"
- <div class="reviews">
- <?php
- global $product;
- if ( get_option( 'woocommerce_enable_review_rating' ) === 'no' ) {
- return;
- }
- $rating_count = $product->get_rating_count();
- $review_count = $product->get_review_count();
- $average_rating = $product->get_average_rating();
- if ( $rating_count > 0 ) :
- echo wc_get_rating_html($average_rating, $rating_count);
- endif;
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement