Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Comment review under 5 start rating

Retrieve only comments with a “Review” type, rated under 5 stars.

// WP_Comment_Query arguments
$args = array(
	'type'           => 'review',
	'meta_query'     => array(
		array(
			'key'     => 'rating',
			'value'   => '5',
			'compare' => '<',
			'type'    => 'NUMERIC',
		),
	),
);

// The Comment Query
$comment_query = new WP_Comment_Query( $args );