Exclude a Woocommerce product from WP_Query

You can use “post__not_in” Parameter. add your products id in array which you want to exclude.

$default = array(
    'post_type' => 'product',
    'post__not_in' => array(2024),       
    'orderby' => 'date',
    'order' => 'DESC',
    'post_status' => 'publish',
    'showposts' => $numberposts
);
if( $category != '' ){
    $term = get_term_by( 'slug', $category, 'product_cat' );
    if( $term ) :
        $term_name = $term->name;
    endif; 
    $default['tax_query'] = array(
        array(
            'taxonomy'  => 'product_cat',
            'field'     => 'slug',
            'terms'     => $category )
    );  
}
$list = new WP_Query( $default );