get_average_rating(), 1 ); $display_rate = $average_rate * 20; $count = $product->get_review_count(); $review_offcanvas = alpha_get_option( 'product_review_offcanvas' ); if ( ! comments_open() ) { return; } ?>
'; $field_html .= '' . esc_html( $field['label'] ); if ( $field['required'] ) { $field_html .= ' *'; } $field_html .= '
' . sprintf( esc_html__( 'You must be %1$slogged in%2$s to post a review.', 'alpus' ), '', '' ) . '
' . esc_html__( 'Your review', 'alpus' ) . '
Reviews
'; $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.', 'alpus' ), '', '' ) . '
'; } 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 ) ); ?>