[BUG/FEATURE?] Discounts and order editing

According to the compatibility table here, discount functions will not re-run when an order is edited in admin:

We’ve been alerted to the following behaviour, which seems at odds. Here’s an original order with a 10% order level discount:

If you edit the quantity on an existing/original line item, the discount value stays the same:

CleanShot 2025-07-09 at 17.57.45

However, if you add a new item, it updates the discount to include that item:

CleanShot 2025-07-09 at 17.58.54

However, if you were then to edit the quantity of an original cart line, the discount reverts to it’s original amount:

CleanShot 2025-07-09 at 17.59.56

In fact, the ‘Amount to collect’ appears to take into account the discount value. Here, we increment an existing cart line by 1, but we only need to collect £4.50, instead of £5.

After completing the edit, the discount shows that it has been updated:

As I’m sure you can see by the above, there’s quite a lot of confusing/contradictory information being shown here.

There are other edge cases where this breaks. For example, in an ‘Order class’ discount, where you exclude specific ‘cart lines’. It’s possible to add an ‘invalid’ item to the order, which will then bypass the function logic (exclusions in this case).

Another example is a spend of £50 minimum, if you edit the order to take it below the threshold, the condition is not upheld, so it’s technically a loop hole.

I imagine this is awfully complex and the edge cases I’ve shown are just touch the surface.

I’d love to know:

1.) What is the expected behaviour here. Should the discount stay static, no matter what?
2.) Are there plans in the future to run functions on things like order editing/subscription payments?

This becomes extremely complicated when you think about discounts expiring, being changed by brands/merchants etc. It would be really handy to really understand the expected behaviour so that it can be relayed to brands/merchants.

5 Likes

Hi @bkspace

Thanks for flagging this - we’re digging into the questions you raised here, thanks for the detailed examples. Will update here when there’s more to share.

1 Like

Hi @bkspace

From connecting with internal team I can confirm that discount functions aren’t re-run in that we don’t re-run the function to get a new result. But, during order edits any discount that is already applied to the order will be applied to the edited items.

Specifically what is applied when depends on how the discount is defined. For example, an order level dollar amount discount will not be added to items added on the order, but a percentage discount will.

We would need to know the discount application and allocations to figure out whether the discount should apply or not.

Right, that makes sense. In the example gifs above, it’s a 10% order discount.

So when I edit an existing item quantity in the order, from your description, the discount should update from £20 → £2X, but this doesn’t appear to happen. When you do click ‘update/save’, a new discount value appears.

I believe there’s just a UI bug in that case, where editing an existing item’s quantity doesn’t show the new discount value.

Hey @bkspace - we’re still looking into this. DMing you for more details.

1 Like