title: Block discount on certain product shopify script
body: <p>I want to write a script in Shopify that prevents discounts from rendering on certain products. I know this is wrong, but something like this:</p>
  
  <pre><code>Input.cart.line_items.each do |line_item|
    product = line_item.variant.product
  
    if product = 123456789
       CartDiscount.remove("Discount does not apply")
    end
  
  end
  
  Output.cart = Input.cart
  </code></pre>
  
  <p>I looked at the <a href="https://help.shopify.com/api/tutorials/shopify-scripts" rel="nofollow noreferrer">documentation</a> and saw the <code>.reject({ message: String })</code> method but it applies to the whole cart. Is there a way to localize this to one instance?</p>