Hi all, I’m creating an discount function and I’m confused about the cart.discountApplications|line.discountAllocations field.
My assumption from the docs is that these fields should list discounts that have already been applied to the cart (or line items), so I expected to see previously‑applied discounts there.
My test case:
Code A = 10% off
Code B = 20% off
Combination is enabled, and in the cart/checkout UI I can clearly see both discounts applied.
In my Discount Function input for the run triggered by Code B:
triggeringDiscountCode is "B"
enteredDiscountCodes contains both "A" and "B"
But cart.discountApplications is always just []
So even though a previous discount is visibly applied, cart.discountApplications is empty.
Is this expected behavior with the unified Discount Function API? Or am I misunderstanding how discountApplications is supposed to work here?
Hi @Liam-Shopify! Just bumping this thread since i stepped in the same problem. I’m curious to understand the possible uses of discountApplications since it doesn’t appear to detect app-based or native discounts.