woocommerce_template_single_rating()WC 1.0

Output the product rating.

Хуков нет.

Возвращает

null. Ничего (null).

Использование

woocommerce_template_single_rating();

Код woocommerce_template_single_rating() WC 9.9.4

function woocommerce_template_single_rating() {
	if ( ! post_type_supports( 'product', 'comments' ) || ! is_a( $GLOBALS['product'] ?? null, \WC_Product::class ) ) {
		return;
	}

	wc_get_template( 'single-product/rating.php' );
}