I've used this convention:
line_item.change_line_price(line_item.line_price_was, message: "Discount does not apply to sale items")
The "Discount does not apply to sale items" message shows when I'm testing the script, but it doesn't show in the actual live cart, so it's confusing to customers why they're getting a discount.
Is it maybe because we're using a custom theme that doesn't have the markup in checkout.liquid? If so, where can I find that markup?
Hey Andy! It's quite possible your cart.liquid doesn't show these prices for the reasons you're thinking. You'll find the resources to update it in the documentation.
However, I'm curious as to how you're using change_line_price, because it shouldn't be possible to increase the price or to remove a discount this way. See the docs for change_line_price