Run the SQL queries below. If your using a custom table prefix, be sure to change ‘wp_’ within the query to your custom prefix.
DELETE FROM wp__term_relationships WHERE object_id IN (SELECT ID FROM wp__posts WHERE post_type = 'product'); DELETE FROM wp__postmeta WHERE post_id IN (SELECT ID FROM wp__posts WHERE post_type = 'product'); DELETE FROM wp__posts WHERE post_type = 'product'; DELETE FROM wp__posts WHERE post_type = 'product_variation';