HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
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/html/wptrinityconsulting/wp-content/themes/finbuzz/woocommerce/single-product/related.php
<?php
/**
 * Related Products
 *
 * This template can be overridden by copying it to yourtheme/woocommerce/single-product/related.php.
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see         https://docs.woocommerce.com/document/template-structure/
 * @package     WooCommerce\Templates
 * @version     3.9.0
 */

$related_product_per_slide=esc_html( FinbuzzTheme::$options['related_product_per_page'] );
$swiper_data=array(
	'slidesPerView' 	=>2,
	'centeredSlides'	=>false,
	'loop'				=>true,
	'spaceBetween'		=>20,
	'slideToClickedSlide' =>true,
	'slidesPerGroup' => 1,
	'autoplay'				=>array(
		'delay'  => 1000,
	),
	'speed'      =>500,
	'breakpoints' =>array(
		'0'    =>array('slidesPerView' =>1),
		'576'    =>array('slidesPerView' =>2),
		'768'    =>array('slidesPerView' =>2),
		'992'    =>array('slidesPerView' =>2),
		'1200'    =>array('slidesPerView' =>2),				
		'1600'    =>array('slidesPerView' =>$related_product_per_slide)				
	),
	'auto'   =>false
);

$swiper_data = json_encode( $swiper_data );
$pro_no =  count($related_products);
?>
<?php if( FinbuzzTheme::$options['related_woo_product'] && $pro_no > 1 ) { ?>
<div class="rt-related-post">
	<div class="rt-related-slider woo-related-product" data-xld = '<?php echo esc_attr($swiper_data) ;?>'>
		<div class="section-title">
			<h3 class="related-title"><?php echo wp_kses( FinbuzzTheme::$options['related_product_title'] , 'alltext_allow' );?>
				<span class="titledot"></span>
				<span class="titleline"></span>
			</h3>				
			<div class="swiper-button">
	            <div class="swiper-button-prev"><i class="fas fa-chevron-left"></i></div>
	            <div class="swiper-button-next"><i class="fas fa-chevron-right"></i></div>
	        </div>
	    </div>
		<div class="swiper-wrapper">		
			<?php foreach ( $related_products as $related_product ) : ?>
			<div class="swiper-slide">
				<?php
				$post_object = get_post( $related_product->get_id() );

				setup_postdata( $GLOBALS['post'] =& $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found

				wc_get_template_part( 'content', 'product' );
				?>
			</div>
			<?php endforeach; ?>
		</div>
	</div>
</div>
<?php } ?>