From e46a4ecf84679a5b15fa90feb5064b5abcf5ae3e Mon Sep 17 00:00:00 2001 From: Georgy Shabunin Date: Wed, 13 Mar 2019 17:06:48 +0100 Subject: [PATCH] Change method alternatives in order deprecations Both #set_shipments_cost and #create_tax_charge are now handled by #recalculate --- core/app/models/spree/order.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/app/models/spree/order.rb b/core/app/models/spree/order.rb index 1b68e1c2930..59680d1c4a4 100644 --- a/core/app/models/spree/order.rb +++ b/core/app/models/spree/order.rb @@ -366,11 +366,11 @@ def line_item_options_match(line_item, options) # Creates new tax charges if there are any applicable rates. If prices already # include taxes then price adjustments are created instead. - # @deprecated This now happens during #update! + # @deprecated This now happens during #recalculate def create_tax_charge! Spree::Config.tax_adjuster_class.new(self).adjust! end - deprecate create_tax_charge!: :update!, deprecator: Spree::Deprecation + deprecate create_tax_charge!: :recalculate, deprecator: Spree::Deprecation def reimbursement_total reimbursements.sum(:total) @@ -582,11 +582,12 @@ def shipping_eq_billing_address? bill_address == ship_address end + # @deprecated This now happens during #recalculate def set_shipments_cost shipments.each(&:update_amounts) recalculate end - deprecate set_shipments_cost: :update!, deprecator: Spree::Deprecation + deprecate set_shipments_cost: :recalculate, deprecator: Spree::Deprecation def is_risky? payments.risky.count > 0