Reject Discount code for few products in Shopify Plus checkout
It's been requested by multiple enterprise clients to remove discount code for particular products.
We thought to have 2 solution
#Reject Discount for few products
reject = false
Input.cart.line_items.select do |line_item|
product = line_item.variant.product
reject = true
if reject and Input.cart.discount_code
message: "discount can't applied! for this product."
Output.cart = Input.cart