mauran / Woocommerce-delete-all-orders

Delete all your Woocommerce orders with this script.
48 stars 13 forks source link

Mysql erros #2

Closed henstercoza closed 8 years ago

henstercoza commented 8 years ago

HI

I get this error message when I try to run it

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELETE FROM wp_woocommerce_order_items

DELETE FROM wp_posts WHERE post_type = '' at line 2

i used this running at the correct database DELETE FROM wp_woocommerce_order_itemmeta DELETE FROM wp_woocommerce_order_items DELETE FROM wp_posts WHERE post_type = 'shop_order'

mauran commented 8 years ago

You need to do the SQL-queries one after one. Line after line

First you run DELETE FROM wp_woocommerce_order_itemmeta

then DELETE FROM wp_woocommerce_order_items

and so on. Is this working?

henstercoza commented 8 years ago

Thank you so much it's working .. my site has over 5200 completed orders and i need to update the word press and plugins ,, so i need to clean house fisrt ..

mauran commented 8 years ago

Glad that i could help!