<?php
/**
 * Loop Rating
 *
 * @author        WooThemes
 * @package       WooCommerce/Templates
 * @version       5.0
 */
if ( !is_search() ) :

	if ( !defined( 'ABSPATH' ) ) {
		exit; // Exit if accessed directly
	}

	global $product;

	if ( get_option( 'woocommerce_enable_review_rating' ) === 'no' )
		return;
	?>

	<?php if ( $rating_html = wc_get_rating_html( $product->get_average_rating() ) ) {
	echo ent2ncr( $rating_html );
} else {
	echo '<div class="star-rating" title="' . esc_attr__( 'Rated 0 out of 5', 'cakeart' ) . '"><span style="width: 0"><strong class="rating">0</strong>' . esc_html__( ' out of 5', 'cakeart' ) . '</span></div>';
}

endif;
?>
