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:
commit
55c29af44d
|
@ -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() ? ' <span class="required">*</span>' : '' ) . '</label><select name="rating" id="rating" required>
|
||||||
<option value="">' . esc_html__( 'Rate…', 'woocommerce' ) . '</option>
|
<option value="">' . esc_html__( 'Rate…', '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>
|
||||||
|
|
Loading…
Reference in New Issue