diff --git a/app/controllers/api/v0/shipments_controller.rb b/app/controllers/api/v0/shipments_controller.rb index 0905abe954..92108b334a 100644 --- a/app/controllers/api/v0/shipments_controller.rb +++ b/app/controllers/api/v0/shipments_controller.rb @@ -32,7 +32,7 @@ module Api @shipment.fee_adjustment.fire_events(:open) if @shipment.update(shipment_params) - @order.updater.update_totals_and_states + @order.update_totals_and_states end @shipment.fee_adjustment.close diff --git a/app/controllers/checkout_controller.rb b/app/controllers/checkout_controller.rb index 2c8b7f7cfe..ea4ad42ac7 100644 --- a/app/controllers/checkout_controller.rb +++ b/app/controllers/checkout_controller.rb @@ -115,7 +115,7 @@ class CheckoutController < ::BaseController end def update_payment_total - @order.updater.update_totals + @order.update_totals @order.updater.update_pending_payment end diff --git a/app/controllers/split_checkout_controller.rb b/app/controllers/split_checkout_controller.rb index 1ccf66f27c..db900e7f0d 100644 --- a/app/controllers/split_checkout_controller.rb +++ b/app/controllers/split_checkout_controller.rb @@ -172,7 +172,7 @@ class SplitCheckoutController < ::BaseController @order.select_shipping_method(params[:shipping_method_id]) @order.update(order_params) - @order.updater.update_totals_and_states + @order.update_totals_and_states validate_current_step! diff --git a/app/controllers/spree/admin/adjustments_controller.rb b/app/controllers/spree/admin/adjustments_controller.rb index 55ab5efefe..2d53dfb13c 100644 --- a/app/controllers/spree/admin/adjustments_controller.rb +++ b/app/controllers/spree/admin/adjustments_controller.rb @@ -14,7 +14,7 @@ module Spree def update_order @order.reload - @order.updater.update_totals_and_states + @order.update_totals_and_states end def collection diff --git a/app/controllers/spree/admin/orders/customer_details_controller.rb b/app/controllers/spree/admin/orders/customer_details_controller.rb index 0ce7ccc166..ed13ae4e52 100644 --- a/app/controllers/spree/admin/orders/customer_details_controller.rb +++ b/app/controllers/spree/admin/orders/customer_details_controller.rb @@ -58,7 +58,7 @@ module Spree @order.create_tax_charge! Spree::TaxRate.adjust(@order, @order.adjustments.admin) - @order.updater.update_totals_and_states + @order.update_totals_and_states end def order_params diff --git a/app/models/spree/order.rb b/app/models/spree/order.rb index a18870bf24..eb7a747f76 100644 --- a/app/models/spree/order.rb +++ b/app/models/spree/order.rb @@ -83,7 +83,7 @@ module Spree accepts_nested_attributes_for :shipments delegate :admin_and_handling_total, :payment_fee, :ship_total, to: :adjustments_fetcher - delegate :update_totals, to: :updater + delegate :update_totals, :update_totals_and_states, to: :updater delegate :create_line_item_fees!, :create_order_fees!, :update_order_fees!, :update_line_item_fees!, :recreate_all_fees!, to: :fee_handler @@ -712,7 +712,7 @@ module Spree return if adjustment.finalized? adjustment.update_adjustment!(force: true) - updater.update_totals_and_states + update_totals_and_states end end end diff --git a/spec/factories/order_factory.rb b/spec/factories/order_factory.rb index efe0eec076..0127bf2541 100644 --- a/spec/factories/order_factory.rb +++ b/spec/factories/order_factory.rb @@ -17,7 +17,7 @@ FactoryBot.define do after(:create) do |order| order.line_items << build(:line_item, order: order) - order.updater.update_totals_and_states + order.update_totals_and_states order.order_cycle.exchanges.outgoing.first.variants << order.line_items.first.variant end @@ -49,7 +49,7 @@ FactoryBot.define do after(:create) do |order| create(:line_item, order: order) order.line_items.reload # to ensure order.line_items is accessible after - order.updater.update_totals_and_states + order.update_totals_and_states end end