Shopify native discount codes will display various different forms of feedback to the customer relating to why a discount code has not applied.
For examples:
However discount functions can only return an empty discounts array, the result of which is that the code simply disappears with no feedback to the customer.
It would be great if we could return a reason for why the code didn’t apply, even if just from a pre-set selection, which would then appear at checkout as above.
Cheers.