Hello i have a online shop using Wordpress and Woocommerce but i have the following problem. I need to change all of my 2000 products to be out of stock, i haven't selected any quantity i only need to change the status. I started doing it by hand but it will take quite a while to mark all the items. After browsing the net i saw that this can be done relatively easy in phpmyadmin, the status is stored in wp_postmeta, i myself tried fiddling with the queries of phpmyadmin but to no avail . Can someone help me with building the query that i need to use ? I use WP 4.1.1
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
ok bro write this query in your db
Update wp_postmeta Set meta_value = 'outofstock' Where meta_value = 'instock' And meta_key = '_stock_status'
I restricted update query more by using And meta_key = '_stock_status'
Hope this will help you ... don't worry query is completely right but you must take a DB backup