Using Shopify Scripts to remove an applied discount code
Update: Shopify Scripts stopped running on 30 June 2026If you’re trying to stop discounts stacking, don’t use the Ruby script below. Shopify Scripts stopped executing on 30 June 2026, so this code no longer runs on stores.