From 4b5d9f1039a1d9617855daf6aa7ff95a175fef24 Mon Sep 17 00:00:00 2001 From: Martin Meyerhoff Date: Tue, 6 Sep 2022 13:38:22 +0200 Subject: [PATCH] Add Documentation to Spree::Promotion::OrderAdjustmentsRecalculator --- .../spree/promotion/order_adjustments_recalculator.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/app/models/spree/promotion/order_adjustments_recalculator.rb b/core/app/models/spree/promotion/order_adjustments_recalculator.rb index 008acd85764..b78db1ef25a 100644 --- a/core/app/models/spree/promotion/order_adjustments_recalculator.rb +++ b/core/app/models/spree/promotion/order_adjustments_recalculator.rb @@ -4,7 +4,11 @@ module Spree class Promotion < Spree::Base # This class encapsulates all the things the promotion system does to - # an order. + # an order. It is called from the `Spree::OrderUpdater` before taxes are + # calculated, such that taxes always respect promotions. + + # This class iterates over all existing promotion adjustments and recalculates + # their amount and eligibility using their adjustment source. class OrderAdjustmentsRecalculator def initialize(order) @order = order