get_id() );
setup_postdata( $GLOBALS['post'] =& $post_object ); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited, Squiz.PHP.DisallowMultipleAssignments.Found
wc_get_template_part( 'content', 'product' );
endforeach;
$products_items = ob_get_clean();
$options = [
// General
'slides_per_row' => $columns,
'autoplay' => false,
'slide_per_single' => count((array)$cross_sells) > 5 ? false : true,
'slider_infinite' => count((array)$cross_sells) > 5 ? true : false,
'slides_transition' => 800,
'animation_triggered_by_mouse' => false,
// Pagination
'use_pagination' => count((array)$cross_sells) > 1 ? true : false,
'pagination_type' => 'circle',
'pagination_dynamic' => false,
// Responsive
'customize_responsive' => true,
'widescreen_breakpoint' => 1601,
'widescreen_slides' => $count,
'desktop_breakpoint' => 993,
'desktop_slides' => $count,
'tablet_breakpoint' => 481,
'tablet_slides' => 2,
'mobile_breakpoint' => 280,
'mobile_slides' => 1,
'responsive_gap' => [
'desktop_gap' => ['size' => 30],
'tablet_gap' => ['size' => 30],
'mobile_gap' => ['size' => 20],
],
'extra_class' => 'number_of_slides-'.count((array)$cross_sells),
];
if ($related_carousel) {
echo WGL_Carousel_Settings::init( $options, $products_items );
}else{
echo WGL_Framework::render_html($products_items);
}
woocommerce_product_loop_end();
?>