Wordpress Woocommerce 将所有产品更改为缺货 [英] Wordpress Woocommerce change all products to out of stock

查看:98
本文介绍了Wordpress Woocommerce 将所有产品更改为缺货的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我有一家使用 Wordpress 和 Woocommerce 的在线商店,但我遇到了以下问题.我需要将我的 2000 件产品全部更改为缺货,我没有选择任何数量,我只需要更改状态.我开始手工做,但标记所有项目需要很长时间.浏览网络后,我发现这在 phpmyadmin 中可以相对容易地完成,状态存储在 wp_postmeta 中,我自己尝试摆弄 phpmyadmin 的查询,但无济于事.有人可以帮助我构建我需要使用的查询吗?我使用 WP 4.1.1

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

推荐答案

好的兄弟在你的数据库中编写这个查询

ok bro write this query in your db

Update wp_postmeta Set meta_value = 'outofstock' Where meta_value = 'instock' And meta_key = '_stock_status'

我通过使用 And meta_key = '_stock_status'

希望这对您有所帮助...不要担心查询是完全正确的,但您必须进行数据库备份

Hope this will help you ... don't worry query is completely right but you must take a DB backup

这篇关于Wordpress Woocommerce 将所有产品更改为缺货的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆