HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/shoetique/wp-content/themes/north-wp/woocommerce/single-product-reviews.php
<?php
/**
 * Display single product reviews (comments)
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.3.2
 */
global $product;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

if ( ! comments_open() ) {
	return;
}

?>
<?php if ( comments_open() ) : ?><div id="reviews"><?php

	echo '<div id="comments">';
	
	$commenter = wp_get_current_commenter();

	if ( have_comments() ) :
		
		echo '<div class="comment_container"><ol class="commentlist">';

		wp_list_comments( apply_filters( 'woocommerce_product_review_list_args', array( 'callback' => 'woocommerce_comments' ) ) );

		echo '</ol>';

		if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
				echo '<nav class="woocommerce-pagination">';
				paginate_comments_links( apply_filters( 'woocommerce_comment_pagination_args', array(
					'prev_text' => '&larr;',
					'next_text' => '&rarr;',
					'type'      => 'list',
				) ) );
				echo '</nav>';
			endif;
		

	endif;
	
	echo '<a href="#comment_popup" id="add_review_button" rel="inline" data-class="review-popup" class="btn large">'.__( 'Add Review', 'north' ).'</a>';
	
		
	$comment_form = array(
		'title_reply' => false,
		'comment_notes_before' => '',
		'comment_notes_after' => '',
		'fields' => array(
			'author' => '<div class="row"><div class="small-12 medium-6 columns">' . '<label for="author">' . __( 'Name', 'north' ) . ' <span class="required">*</span></label> ' .
			            '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" aria-required="true" /></div>',
			'email'  => '<div class="small-12 medium-6 columns"><label for="email">' . __( 'Email', 'north' ) . ' <span class="required">*</span></label> ' .
			            '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30" aria-required="true" /></div></div>',
		),
		'label_submit' => __( 'Submit Review', 'north' ),
		'logged_in_as' => '',
		'comment_field' => ''
	);

	if ( get_option('woocommerce_enable_review_rating') == 'yes' ) {

		$comment_form['comment_field'] = '<p class="comment-form-rating"><label for="rating">' . __( 'Rating', 'north' ) .'</label><select name="rating" id="rating">
			<option value="">'.__( 'Rate&hellip;', 'north' ).'</option>
			<option value="5">'.__( 'Perfect', 'north' ).'</option>
			<option value="4">'.__( 'Good', 'north' ).'</option>
			<option value="3">'.__( 'Average', 'north' ).'</option>
			<option value="2">'.__( 'Not that bad', 'north' ).'</option>
			<option value="1">'.__( 'Very Poor', 'north' ).'</option>
		</select></p>';
		
		
	}

	$comment_form['comment_field'] .= '<div class="row"><div class="small-12 columns"><label for="comment">' . __( 'Your Review', 'north' ) . '</label><textarea id="comment" name="comment" cols="45" rows="22" aria-required="true"></textarea></div></div>';
	
	echo '</div>';
?>
</div>
<aside id="comment_popup" class="mfp-hide">
	<div class="row">
		<div class="small-12 columns">
			<?php comment_form( apply_filters( 'woocommerce_product_review_comment_form_args', $comment_form ) ); ?>
		</div>
	</div>
</aside>
<?php endif; ?>