have_comments() ? '' : sprintf( esc_html__( '%1$sBe the first to review “%2$s”%3$s', 'woocommerce' ), '
', get_the_title(), '' ),
/* translators: %s is product title */
'title_reply_to' => esc_html__( 'Leave a Reply to %s', 'woocommerce' ),
'title_reply_before' => '',
'comment_notes_after' => '',
'logged_in_as' => '',
'comment_field' => '',
'submit_button' => '
',
);
$name_email_required = (bool) get_option( 'require_name_email', 1 );
$fields = array(
'author' => array(
'label' => __( 'Name', 'woocommerce' ),
'type' => 'text',
'value' => $commenter['comment_author'],
'required' => $name_email_required,
'placeholder' => __( 'Enter your name', 'woocommerce' ),
),
'email' => array(
'label' => __( 'Email', 'woocommerce' ),
'type' => 'email',
'value' => $commenter['comment_author_email'],
'required' => $name_email_required,
'placeholder' => __( 'Enter your email', 'woocommerce' ),
),
);
$comment_form['fields'] = array();
foreach ( $fields as $key => $field ) {
$field_html = '';
$comment_form['fields'][ $key ] = $field_html;
}
$account_page_url = wc_get_page_permalink( 'myaccount' );
if ( $account_page_url ) {
/* translators: %s opening and closing link tags respectively */
$comment_form['must_log_in'] = '
' . sprintf( esc_html__( 'You must be %1$slogged in%2$s to post a review.', 'woocommerce' ), '', '' ) . '
';
}
if ( wc_review_ratings_enabled() ) {
$comment_form['comment_field'] = '
';
}
$comment_form['comment_field'] .= '';
comment_form( apply_filters( 'woocommerce_product_review_comment_form_args', $comment_form ) );
?>
'woocommerce_comments' ) ) ); ?>
1 && get_option( 'page_comments' ) ) : echo ''; endif; ?>