WC_Meta_Box_Product_Reviews::output()public staticWC 1.0

Output the metabox.

{} It's a method of the class: WC_Meta_Box_Product_Reviews{}

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Meta_Box_Product_Reviews::output( $comment );
$comment(object) (required)
Comment being shown.

Code of WC_Meta_Box_Product_Reviews::output() WC 6.7.0

<?php
public static function output( $comment ) {
	wp_nonce_field( 'woocommerce_save_data', 'woocommerce_meta_nonce' );

	$current = get_comment_meta( $comment->comment_ID, 'rating', true );
	?>
	<select name="rating" id="rating">
		<?php
		for ( $rating = 1; $rating <= 5; $rating ++ ) {
			printf( '<option value="%1$s"%2$s>%1$s</option>', $rating, selected( $current, $rating, false ) ); // WPCS: XSS ok.
		}
		?>
	</select>
	<?php
}