Calling Developers!
We are reenergizing our code contribution process! Learn More

Expired voucher codes in Order calculator stack

mikko.ropanen Spryker Solution Partner Posts: 9 🧑🏻‍🚀 - Cadet

The order calculator stack is run when doing e.g. returns

In the DiscountCalculationPlugin, this method is run: \Spryker\Zed\Discount\Business\Calculator\Discount::retrieveActiveCartAndVoucherDiscounts

Here it's only retrieving vouchers that are currently active. So, if the order was placed with a then-active voucher code that has since expired, the calculation will ignore it and calculate the order discounts wrong.

How is this supposed to work?