Fix proposal and bug report: Vendors can’t filter orders by order status
-
Vendors can’t filter orders by status in
MARKETPLACE_DOMAIN/store-manager/orderslist
, because all orders are viewed as pending. This error happened to us in a WCFM Marketplace where BACS is the only payment method, but since the problem originates with the controllerwcfm-orders
, we write this here.After a lot of debugging, we found the problem: despite the fact that the filter has the name and id
commission-status
, and that the request sent toadmin-ajax.php
also names that parametercommission-status
, the query sent to the database searches that variable in the columnwcfm_marketplace_orders.withdraw_status
. This a problem, because when vendors mark the order completed, the withdrawal status in the database doesn’t change (it stays as “pending” regardless of the status of the order).A quick fix for this issue was modifying the next files:
- wc-frontend-manager/controllers/orders/wcfm-controller-wcfmmarketplace-orders.php
- wc-frontend-manager/controllers/orders/wcfm-controller-wcfmmarketplace-itemized-orders.php
By replacing the string
” AND
withdraw_status
= ‘{$commission_status}'”;with the more consistent
” AND
commission_status
= ‘{$commission_status}'”;in both files.
Sadly, these controller files cannot be overwritten like templates, so I ask you if you can incorporate this to your plugin. In case it’s not possible, I would want to know if it’s possible to force the withdraw_status to have the same value as order_status and commission_status.
Greetings!
- The topic ‘Fix proposal and bug report: Vendors can’t filter orders by order status’ is closed to new replies.