Discount automatically applies on checkout, no code required.

Media