WP CLI 命令从特定类别中删除产品?
What的命令
DELETE ALL CATEGORIES IS - wp term list product_cat --field=term_id | xargs wp term delete product_cat
AND
DELETE ALL THE PRODUCTS IS - wp post list —field=ID —post_type=product | xargs wp post delete —force
是从特定类别中选择产品并删除它们的命令。
非常感谢帮助。
While the command to
DELETE ALL CATEGORIES IS - wp term list product_cat --field=term_id | xargs wp term delete product_cat
AND
DELETE ALL THE PRODUCTS IS - wp post list —field=ID —post_type=product | xargs wp post delete —force
what would be the command to select products from a specific category/categories and delete them.
Help much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用类别说明符
--category="您的类别"
。例如
wp post delete $(wp wc Product list --user=1 --format=ids --category=64) --force
。You use the category specifier
--category="your category"
.For example
wp post delete $(wp wc product list --user=1 --format=ids --category=64) --force
.