Support » Plugin: WooCommerce » reviews product page

  • Resolved mamielaure

    (@mamielaure)


    Hi all,
    I’ve an issue with reviews in product page. Placeholders (or field titles) don’t apprear.
    Hw can I resolve this problem ?

    Thanks for your help

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    I have navigated to the product URL which is provided by you but I didn’t get any review section.
    Please share the screenshot or video of the issue so that I can provide you the solution.

    Regards

    Hello,

    thanks for your fast answer.

    There is any review section

    https://directverger.fr/produit/nectar-dabricot-1l/

    Please go to woocommerce/templates/single-product-reviews.php file and replace this code from the existing code and then check the review section you will see the place holder for both the fields.

    $fields              = array(
    'author' => array(
    'label'    => __( 'Name', 'woocommerce' ),
    'type'     => 'text',
    'value'    => $commenter['comment_author'],
    'required' => $name_email_required,
    'placeholder'=>'author name',
    ),
    'email' => array(
    'label'    => __( 'Email', 'woocommerce' ),
    'type'     => 'email',
    'value'    => $commenter['comment_author_email'],
    'required' => $name_email_required,
    'placeholder'=>"email",
    ),
    );
    
    $comment_form['fields'] = array();
    foreach ( $fields as $key => $field ) {
    $field_html  = '<p class="comment-form-' . esc_attr( $key ) . '">';
    	$field_html .= '<label for="' . esc_attr( $key ) . '">' . esc_html( $field['label'] );
    
    		if ( $field['required'] ) {
    		$field_html .= '&nbsp;<span class="required">*</span>';
    	}
    
    $field_html .= '</label><input id="' . esc_attr( $key ) . '" placeholder="' . esc_attr( $field['placeholder'] ) . '" name="' . esc_attr( $key ) . '" type="' . esc_attr( $field['type'] ) . '" value="' . esc_attr( $field['value'] ) . '" size="30" ' . ( $field['required'] ? 'required' : '' ) . ' /></p>';
    
    $comment_form['fields'][ $key ] = $field_html;
    }

    This code will help you in what you are looking .
    Regards

    Plugin Support m155y5

    (@m155y5)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to go ahead and mark this thread as resolved. If you have any other questions please feel free to start a new thread.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.