have_comments() ? __( 'Add a review', 'bs4' ) : sprintf(
/* translators: %s product title. */
esc_attr__( 'Be the first to review “%s”', 'bs4' ),
get_the_title()
),
'title_reply_to' => /* translators: %s product title. */ __( 'Leave a Reply to %s', 'bs4' ),
'title_reply_before' => '',
'comment_notes_after' => '',
'fields' => array(
'author' => sprintf(
'',
bs4_form_label( esc_attr__( 'Name', 'bs4' ), 'author', array(
'class' => 'col-sm-2 col-form-label',
) ),
bs4_form_input( 'author', $commenter['comment_author'], array(
'placeholder' => esc_attr__( 'Your name', 'bs4' ),
) )
),
'email' => sprintf(
'',
bs4_form_label( esc_attr__( 'Email', 'bs4' ), 'email', array(
'class' => 'col-sm-2 col-form-label',
) ),
bs4_form_input( 'email', $commenter['comment_author_email'], array(
'placeholder' => esc_attr__( 'Your email', 'bs4' ),
) )
),
),
'label_submit' => __( 'Add Review', 'bs4' ),
'submit_field' => '',
'class_submit' => esc_attr( join( ' ', bs4_get_btn_class() ) ),
'logged_in_as' => '',
);
$account_page_url = wc_get_page_permalink( 'myaccount' );
if ( $account_page_url ) :
$comment_form['must_log_in'] = '
' . sprintf(
/* translators: %s product title. */
__( 'You must be logged in to post a review.', 'bs4' ), esc_url( $account_page_url )
) . '
';
endif;
if ( get_option( 'woocommerce_enable_review_rating' ) === 'yes' ) :
$ratings_options = array(
'' => esc_html__( 'Rate…', 'bs4' ),
'5' => esc_html__( 'Perfect', 'bs4' ),
'4' => esc_html__( 'Good', 'bs4' ),
'3' => esc_html__( 'Average', 'bs4' ),
'2' => esc_html__( 'Not that bad', 'bs4' ),
'1' => esc_html__( 'Very poor', 'bs4' ),
);
$comment_form['comment_field'] = '';
endif;
$comment_form['comment_field'] .= sprintf(
'',
bs4_form_label( esc_attr__( 'Comment', 'bs4' ), 'comment' ),
bs4_form_textarea( 'comment', '', array(
'placeholder' => __( 'Your comment', 'bs4' ),
) )
);
comment_form( apply_filters( 'woocommerce_product_review_comment_form_args', $comment_form ) );
?>
get_review_count(); if ( get_option( 'woocommerce_enable_review_rating' ) === 'yes' && ( $count ) ) : /* translators: 1: reviews count 2: product name */ printf( esc_html( _n( '%1$s review for %2$s', '%1$s reviews for %2$s', $count, 'bs4' ) ), esc_html( $count ), '' . get_the_title() . '' ); else : esc_attr_e( 'Reviews', 'bs4' ); endif; ?>
'woocommerce_comments', ) ) ); ?>
1 && get_option( 'page_comments' ) ) : bs4_comments_pagination(); endif; ?>