This was working perfectly to apply the discount up until this last week.
It now seems that the form data is sent when the cart form is submitted but the discount is not applied in the Shopify Checkout.
Does anyone know if anything has changed that might mean this needs to be handled a different way? I've noticed that if i make the discount available to all customers this works, if i set it to only specific customers it stops working. Almost as if the customer group is not carried forward to the checkout