'; if ( get_option('woocommerce_enable_review_rating') == 'yes' ) { $count = $product->get_rating_count(); if ( $count > 0 ) { $average = $product->get_average_rating(); echo '
'; echo '
'.$average.' '.__( 'out of 5', 'woocommerce' ).'
'; echo '

'.sprintf( _n('%s review for %s', '%s reviews for %s', $count, 'woocommerce'), ''.$count.'', wptexturize($post->post_title) ).'

'; echo '
'; } else { echo '

'.__( 'Reviews', 'woocommerce' ).'

'; } } else { echo '

'.__( 'Reviews', 'woocommerce' ).'

'; } $title_reply = ''; if ( have_comments() ) : echo '
    '; wp_list_comments( array( 'callback' => 'woocommerce_comments' ) ); echo '
'; if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> ' . __( 'Add Review', 'woocommerce' ) . '

'; $title_reply = __( 'Add a review', 'woocommerce' ); else : $title_reply = __( 'Be the first to review', 'woocommerce' ).' “'.$post->post_title.'”'; echo '

' . sprintf( __( 'There are no reviews yet, would you like to %s submit yours%s?', 'woocommerce' ), '', '' ) . '

'; endif; $commenter = wp_get_current_commenter(); echo '
'; $comment_form = array( 'title_reply' => $title_reply, 'comment_notes_before' => '', 'comment_notes_after' => '', 'fields' => array( 'author' => '

' . ' ' . '*' . '

', 'email' => '', ), 'label_submit' => __( 'Submit Review', 'woocommerce' ), 'logged_in_as' => '', 'comment_field' => '' ); if ( get_option('woocommerce_enable_review_rating') == 'yes' ) { $comment_form['comment_field'] = '

'; } $comment_form['comment_field'] .= '

' . wp_nonce_field( 'woocommerce-comment_rating', '_wpnonce', true, false ) . '

'; comment_form( apply_filters( 'woocommerce_product_review_comment_form_args', $comment_form ) ); echo '
'; ?>