Sha256: c3d41ed218004f835a1baf705c33c2d0a5bff2dc7172859763c17e2f59ce24d8

Contents?: true

Size: 664 Bytes

Versions: 14

Compression:

Stored size: 664 Bytes

Contents

# frozen_string_literal: true

require_dependency 'spree/calculator'

module Spree
  # @deprecated This calculator will be removed in future versions of Spree.
  #   The only case where it was used was for Free Shipping Promotions.  There is
  #   now a Promotion Action which deals with these types of promotions instead.
  class Calculator::FreeShipping < Calculator
    def compute(object)
      Spree::Deprecation.warn('This method is deprecated, because it is no longer used')
      if object.is_a?(Array)
        return if object.empty?
        order = object.first.order
      else
        order = object
      end

      order.ship_total
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
solidus_core-2.11.17 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.16 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.15 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.14 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.13 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.12 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.11 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.10 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.9 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.8 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.7 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.6 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.5 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.4 app/models/spree/calculator/free_shipping.rb