Merge pull request #26596 from woocommerce/fix/26511

Add asterisk to star rating if 'Star ratings should be required, not optional' checkbox is enabled
This commit is contained in:
Julia Amosova 2020-05-26 13:45:30 -04:00 committed by GitHub
commit 55c29af44d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ if ( ! comments_open() ) {
} }
if ( wc_review_ratings_enabled() ) { if ( wc_review_ratings_enabled() ) {
$comment_form['comment_field'] = '<div class="comment-form-rating"><label for="rating">' . esc_html__( 'Your rating', 'woocommerce' ) . '</label><select name="rating" id="rating" required> $comment_form['comment_field'] = '<div class="comment-form-rating"><label for="rating">' . esc_html__( 'Your rating', 'woocommerce' ) . ( wc_review_ratings_required() ? '&nbsp;<span class="required">*</span>' : '' ) . '</label><select name="rating" id="rating" required>
<option value="">' . esc_html__( 'Rate&hellip;', 'woocommerce' ) . '</option> <option value="">' . esc_html__( 'Rate&hellip;', 'woocommerce' ) . '</option>
<option value="5">' . esc_html__( 'Perfect', 'woocommerce' ) . '</option> <option value="5">' . esc_html__( 'Perfect', 'woocommerce' ) . '</option>
<option value="4">' . esc_html__( 'Good', 'woocommerce' ) . '</option> <option value="4">' . esc_html__( 'Good', 'woocommerce' ) . '</option>