Skip to content

Commit

Permalink
Feat(Promotions): Use order_activatable in OrderAdjuster
Browse files Browse the repository at this point in the history
This duplicated the logic from
SolidusPromotions::Promotion.order_activatable, and this way it reads
nicer.

(cherry picked from commit 3588c15)
  • Loading branch information
mamhoff committed Dec 6, 2024
1 parent 06687c6 commit 38c4e1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion promotions/app/models/solidus_promotions/order_adjuster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def initialize(order, dry_run_promotion: nil)
def call
order.reset_current_discounts

return order if (!SolidusPromotions.config.recalculate_complete_orders && order.complete?) || order.shipped?
return order unless SolidusPromotions::Promotion.order_activatable?(order)

discounted_order = DiscountOrder.new(order, promotions, dry_run: dry_run).call

Expand Down

0 comments on commit 38c4e1a

Please sign in to comment.