Line item discount script not applying at checkout (works fine on cart)

Shopify Partner
2 0 1


I have a line item script that applies a discount to items based off other items in the cart, and uses the[] variable to identify certain items (based off a specific array key value).

My script works on the cart, and when performing tests in the script editor, however when I proceed through the checkout flow onto the checkout page, the discounts are no longer applied.

Can anyone provide any advice?