How to hide discount text on order page without checkout.liquid (post checkout extensibility)

Topic summary

Issue: A merchant previously used Shopify Scripts to apply an additional 15% discount on sale items, requiring a 0% discount code in the backend. This resulted in two discount messages at checkout: one for the 0% code (“SALE15”) and one for the 15% script-generated discount (“EXTRA 15% OFF”).

Previous Solution: Custom code in checkout.liquid hid the unwanted “SALE15” message using jQuery to target and hide elements containing that text.

Current Problem: With checkout extensibility, checkout.liquid is deprecated (removal date: August 13, 2024). The script still functions, but both discount messages now appear again.

Proposed Workaround: Inject JavaScript into Settings → Checkout → Order Status Page → Additional Scripts to hide the unwanted discount text. This method will only work until August 28, 2025. Exact code requires inspecting the Order Status page’s HTML elements.

Status: The discussion remains open with a temporary solution that has a limited timeframe.

Summarized with AI on November 7. AI used: claude-sonnet-4-5-20250929.

hello,

Before checkout extension upgrade, we were using shopify scripts to control a discount. The script specifically targeted variants that were on sale and allowed an additional 15% off with a code.

To make that script work, the discount code also needed to be set up in shopify back end with a percent off of 0%.

Then when customer entered code at checkout, it showed both the 0% message and the 15% off script message.

To combat this, we added some code to checkout.liquid to hide discount text that contained the code, like this:

Now that checkout.liquid is gone, the script still works but it shows both messages. What can i do to hide that SALE15 message? Below is what it looks like now, SALE15 is generated from the shopify discount in the admin, EXTRA 15% OFF is generated from shopify scripts. I want to hide the SALE15 line.

Thanks a lot!

You can try to inject a Javascript in Settings → Checkout → Order status page → Additional Scripts

This is the only way after the deprecation of checkout.liquid which will happen on 13 August 2024.

I cannot provide you the exact code, without looking at the HTML elements of your Order Status page.
Pay attention that this method will work until August 28, 2025.