【发布时间】:2019-07-08 19:16:46
【问题描述】:
将 WordPress 升级到 v5.0.3 后,Woocommerce 订单未在管理面板的订单页面中全部显示。 经过一点调试,两个版本发送的查询是不同的。 以前是:
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'shop_order' AND ((wp_posts.post_status = 'wc-pending' OR wp_posts.post_status = 'wc-processing' OR wp_posts.post_status = 'wc-on-hold' OR wp_posts.post_status = 'wc-completed' OR wp_posts.post_status = 'wc-cancelled' OR wp_posts.post_status = 'wc-refunded' OR wp_posts.post_status = 'wc-failed' OR wp_posts.post_status = 'wc-shipped' OR wp_posts.post_status = 'wc-approved')) ORDER BY wp_posts.post_date DESC LIMIT 0, 20
之前但更新的版本是:
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'shop_order' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'wc-shipped' OR wp_posts.post_status = 'wc-approved' OR wp_posts.post_status = 'future' OR wp_posts.post_status = 'draft' OR wp_posts.post_status = 'pending' OR wp_posts.post_status = 'private') ORDER BY wp_posts.post_date DESC LIMIT 0, 20
我正在使用 WooCommerce v3.2.1
【问题讨论】:
-
我无法升级 WC,因为与当前版本相关的东西太多了。
标签: php wordpress woocommerce