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.
  • Loading branch information
mamhoff authored and tvdeyen committed Dec 5, 2024
1 parent a2e034e commit 3588c15
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 3588c15

Please sign in to comment.