1DELETE relations.*, taxes.*, terms.*
2FROM wp_term_relationships AS relations
3INNER JOIN wp_term_taxonomy AS taxes
4ON relations.term_taxonomy_id=taxes.term_taxonomy_id
5INNER JOIN wp_terms AS terms
6ON taxes.term_id=terms.term_id
7WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type='product');
8
9DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type = 'product');
10DELETE FROM wp_posts WHERE post_type = 'product';
11
1DELETE relations.*, taxes.*, terms.*
2
3FROM wp_term_relationships AS relations
4
5INNER JOIN wp_term_taxonomy AS taxes
6
7ON relations.term_taxonomy_id=taxes.term_taxonomy_id
8
9INNER JOIN wp_terms AS terms
10
11ON taxes.term_id=terms.term_id
12
13WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'));
14
15DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'));
16
17DELETE FROM wp_posts WHERE post_type IN ('product','product_variation');
1remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );