woocommerce_review_order_rating_labels │ filter-hook │ WC 10.8.0

Filter the labels shown under the star-rating control.

Usage

add_filter( 'woocommerce_review_order_rating_labels', 'wp_kama_woocommerce_review_order_rating_labels_filter' );

/**
 * Function for `woocommerce_review_order_rating_labels` filter-hook.
 * 
 * @param array $labels Map of rating value (1-5) to label.
 *
 * @return array
 */
function wp_kama_woocommerce_review_order_rating_labels_filter( $labels ){
	// filter...
	return $labels;
}
$labels(array<int, string>)
Map of rating value (1-5) to label.

Changelog

Since 10.8.0 Introduced.

Where the hook is called

StarRating::get_labels()
woocommerce_review_order_rating_labels
woocommerce/src/Internal/OrderReviews/StarRating.php 98
$filtered = (array) apply_filters( 'woocommerce_review_order_rating_labels', $labels );

Where the hook is used in WooCommerce

Usage not found.