WordPress at Your Fingertips
function is not described

wc_get_rating_html() WC 3.0.0

Get HTML for ratings.

Hooks from the function
Return

String.

Usage

wc_get_rating_html( $rating, $count );
$rating(float) (required)
Rating being shown.
$count(int)
Total number of ratings.

Changelog

Since 3.0.0 Introduced.

Code of wc_get_rating_html() WC 5.7.0

function wc_get_rating_html( $rating, $count = 0 ) {
	$html = '';

	if ( 0 < $rating ) {
		/* translators: %s: rating */
		$label = sprintf( __( 'Rated %s out of 5', 'woocommerce' ), $rating );
		$html  = '<div class="star-rating" role="img" aria-label="' . esc_attr( $label ) . '">' . wc_get_star_rating_html( $rating, $count ) . '</div>';
	}

	return apply_filters( 'woocommerce_product_get_rating_html', $html, $rating, $count );
}