get_review_count(); $avg_rate_score = number_format( $product->get_average_rating(), 1 ); $rate_counts = blockpress_get_ratings_counts( $product ); if ( ! comments_open() || !function_exists('wc_review_ratings_enabled')) { return; } ?>
' . '
', ), 'label_submit' => esc_html__( 'Submit', 'blockpress' ), 'logged_in_as' => '', 'comment_field' => '' ); if ( $account_page_url = wc_get_page_permalink( 'myaccount' ) ) { $comment_form['must_log_in'] = '' . sprintf( esc_html__( 'You must be %s%s%s logged in %s to post a review.', 'blockpress' ), '', '' ) . '
'; } if (wc_review_ratings_enabled()) { $usercomment = ''; if(is_user_logged_in()){ $currentuser = get_current_user_id(); $usercomment = get_comments(array('user_id' => $currentuser, 'post_id' => $product->get_id())); } else{ $commentemail = (!empty($commenter['comment_author_email'])) ? $commenter['comment_author_email'] : ''; if($commentemail){ $usercomment = get_comments(array('author_email' => $commentemail, 'post_id' => $product->get_id())); } } if(empty($usercomment)){ $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; ?>