Bug Report: Redeemed Points Are Not Deducted When a Cancelled Order Is Moved Back to Processing
Add a Reply
You must be logged in to reply to this ticket.
Hi,
I found a bug in the Smart Points and Rewards plugin related to points being restored after an order is cancelled and then later moved back to processing.
Issue
When a customer places an order and redeems points, the points are correctly applied to the order. However, if the order is placed on hold because the customer is using a manual payment method, and the order is subsequently cancelled due to non-payment, the redeemed points are correctly returned to the customer's account.
The problem occurs if the customer later makes the payment and an administrator changes the order status from Cancelled back to Processing.
In this scenario, the original points that were redeemed are applied to the order again, but they are not deducted from the customer's points balance. This effectively allows the customer to receive the benefit of redeeming the points without actually spending those points.
Steps to Reproduce
- A customer places an order.
- The customer redeems, for example, 1,000 points toward the order.
- The order is placed On Hold because the payment method is a manual payment method rather than a credit card.
- The customer fails to make the payment within the required timeframe.
- An administrator cancels the order.
- The 1,000 redeemed points are correctly returned to the customer's points balance.
- The customer subsequently makes the payment for the order.
- An administrator changes the order status from Cancelled back to Processing.
- The order still benefits from the original 1,000-point redemption, but the 1,000 points are not deducted from the customer's account.
Expected Behavior
When a cancelled order is moved back to Processing, the plugin should correctly account for the points that were originally redeemed.
The customer's points balance should be adjusted so that the points cannot be used for the order while also remaining available in their account.
Actual Behavior
The customer receives the benefit of the original point redemption, while the redeemed points remain in their account.
This effectively gives the customer the discount twice: once through the original redemption and again because the points were restored to their account and were not deducted when the order was moved back to Processing.
When this scenario occurs with a customer, they are no longer able to redeem points from their account. They encounter an error on the frontend every time they try to redeem their points.
Impact
This can result in a direct financial loss for the store. Customers who make their payment after an order has been cancelled could unintentionally or intentionally benefit from this behavior if the issue is not noticed by an administrator.
We discovered this issue today and were fortunately able to catch it before it affected more customers, but it has already resulted in some financial loss.
Please investigate and fix this issue as soon as possible. It would also be helpful to ensure that the points transaction history remains consistent when an order changes from Cancelled back to Processing, particularly for orders where points were previously redeemed and subsequently restored.




