Closed AymericJoubert closed 2 years ago
Preconditions :
Bug : The cron "CleanPendingOrders" with cancel the order, but will not refund store credit to customer.
Context : There is an event on order cancellation in magento commerce to refund store credit, but there is this condition a the beginning :
if (!$order->getCustomerId() || !$order->getBaseCustomerBalanceAmount()) { return $this; }
Store credit is not refunded because customer_id is not loaded within the order collection.
Fix : Simply add 'customer_id' to the order collection selected fields in CleanPendingOrders and the process works well.
Fixed in 1.14.3
Thanks
Preconditions :
Bug : The cron "CleanPendingOrders" with cancel the order, but will not refund store credit to customer.
Context : There is an event on order cancellation in magento commerce to refund store credit, but there is this condition a the beginning :
Store credit is not refunded because customer_id is not loaded within the order collection.
Fix : Simply add 'customer_id' to the order collection selected fields in CleanPendingOrders and the process works well.