<?php
defined('ABSPATH') || exit;

if (!class_exists('WooCommerce')) {
    return;
}

$latest_products = wc_get_products(array(
    'limit' => 8,
    'orderby' => 'date',
    'order' => 'DESC',
    'status' => 'publish'
));

if (empty($latest_products)) {
    return;
}
?>
<!-- start best selling laptops -->
<section class="container-main mt-10 elementor-widget elementor-widget-woocommerce-products">
    <?php get_template_part('template-parts/woocommerce', 'latest-products', array('products' => $latest_products)); ?>
</section>
<!-- end best selling laptops -->


