Warning: Declaration of PAFE_Support::register_controls($element, $section_id) should be compatible with Elementor\Controls_Stack::register_controls() in /var/www/web1/htdocs/projekte/cg/wp-content/plugins/piotnet-addons-for-elementor-pro/controls/pafe-support.php on line 15

Warning: Declaration of PAFE_Woocommerce_Sales_Funnels_Add_To_Cart::register_controls($element, $section_id) should be compatible with Elementor\Controls_Stack::register_controls() in /var/www/web1/htdocs/projekte/cg/wp-content/plugins/piotnet-addons-for-elementor-pro/controls/pafe-woocommerce-sales-funnels-add-to-cart.php on line 14
Löschen aller Produkte und Kategorien in Woocommerce - creatin g

Löschen aller Produkte und Kategorien in Woocommerce

ACHTUNG!!! Wie immer, vorher Backup erstellen!

Gegebenfalls bitte das Tabellen-Prefix ändern. (Ersetze wp_ durch EuerPrefix_)

Viel Spaß beim Nachkochen.

Löschen aller Produkte per SQL

DELETE relations.*, taxes.*, terms.*
FROM wp_term_relationships AS relations
INNER JOIN wp_term_taxonomy AS taxes
ON relations.term_taxonomy_id=taxes.term_taxonomy_id
INNER JOIN wp_terms AS terms
ON taxes.term_id=terms.term_id
WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'));

DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'));
DELETE FROM wp_posts WHERE post_type IN ('product','product_variation');

Quelle

Löschen aller Kategorien und Schlagwörter

DELETE a,c FROM wp_terms AS a 
LEFT JOIN wp_term_taxonomy AS c ON a.term_id = c.term_id
LEFT JOIN wp_term_relationships AS b ON b.term_taxonomy_id = c.term_taxonomy_id
WHERE c.taxonomy = 'product_tag';

DELETE a,c FROM wp_terms AS a
LEFT JOIN wp_term_taxonomy AS c ON a.term_id = c.term_id
LEFT JOIN wp_term_relationships AS b ON b.term_taxonomy_id = c.term_taxonomy_id
WHERE c.taxonomy = 'product_cat'

Quelle

1 Kommentar zu „Löschen aller Produkte und Kategorien in Woocommerce“

Kommentar verfassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Scroll to Top