<?php $num_of_post_to_show = get_theme_mod('product_section_option', 8 ); ?>
<div class="woocommerce woocommerce-page">
    <h1>Recently Added Products</h1>
    <ul class="products columns-<?php echo esc_attr( wc_get_loop_prop( 'columns' ) ); ?>">
        <?php
            $args = array(
            'post_type' => 'product',
            'posts_per_page' => esc_html($num_of_post_to_show)
            );
            $loop = new WP_Query( $args );
            if ( $loop->have_posts() ) {
            while ( $loop->have_posts() ) : $loop->the_post();
            woocommerce_get_template_part( 'content', 'product' );
            endwhile;
            } else {
            echo esc_html__( 'No products found', 'pakwall' );
            }
            wp_reset_postdata();
        ?>
    </ul>
</div>