Skip to content

Commit

Permalink
Do not consider unpromotionable line items discountable
Browse files Browse the repository at this point in the history
  • Loading branch information
mamhoff committed Mar 21, 2022
1 parent 6290769 commit e341f09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/app/models/spree/promotion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ def order_discountable?(order)
end

def line_item_discountable?(line_item)
rules.all? { |rule| rule.line_item_discountable?(line_item) }
line_item.variant.product.promotionable? &&
rules.all? { |rule| rule.line_item_discountable?(line_item) }
end

def shipment_discountable?(shipment)
Expand Down

0 comments on commit e341f09

Please sign in to comment.