以下sql查询将更改订单状态: update wp_posts set post_status = 'wc-completed' where post_type = 'shop_order' and post_status ='wc-processing' ; 如何仅在特定日期之前更改订单状态?
update wp_posts set post_status = 'wc-completed' where post_type = 'shop_order' and post_status ='wc-processing' ;
xn1cxnb41#
批量更改日期之前的订单状态(例如 05 OCT 2018 )使用此sql查询(在此之前始终进行数据库备份):
05 OCT 2018
UPDATE `wp_posts` SET `post_status` = 'wc-completed' WHERE `post_type` = 'shop_order' AND `post_status` ='wc-processing' AND `post_date` < '2018-10-05 00:00:00';
测试和工作
1条答案
按热度按时间xn1cxnb41#
批量更改日期之前的订单状态(例如
05 OCT 2018
)使用此sql查询(在此之前始终进行数据库备份):测试和工作