<?php
    $product_list = isset($args['list']) ? $args['list']:array();
    $post_per_page = isset($args['post_on_row']) ? $args['post_on_row']:3;
?>
<div class="product-2__list product-animation product-2__list-<?php echo esc_attr($post_per_page); ?>">
    <?php
    $args = array(
        'post_type' => 'product',
        'post__in'      => $product_list,
    );
    $the_query = new WP_Query( $args );
    if ( $the_query->have_posts() ) :
        while ( $the_query->have_posts() ) :
            $the_query->the_post();
            get_template_part( 'woocommerce/content', 'product2-item' );
        endwhile;
    endif;
    wp_reset_postdata();
    ?>
</div>