Sha256: c30f3979cbd37c5cccce0c265cade62d141ffd05924ba90cc9a3a88e27a54b6c

Contents?: true

Size: 627 Bytes

Versions: 12

Compression:

Stored size: 627 Bytes

Contents

module Spree
  class Calculator::FreeShipping < Calculator
    def self.description
      Spree.t(:free_shipping)
    end

    def compute(object)
      ActiveSupport::Deprecation.warn(<<-EOS, caller)
        Spree::Calculator::FreeShipping will be removed in Spree 3.3
        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
      EOS
      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

12 entries across 12 versions & 1 rubygems

Version Path
spree_core-3.2.9 app/models/spree/calculator/free_shipping.rb
spree_core-3.2.8 app/models/spree/calculator/free_shipping.rb
spree_core-3.2.7 app/models/spree/calculator/free_shipping.rb
spree_core-3.2.6 app/models/spree/calculator/free_shipping.rb
spree_core-3.2.5 app/models/spree/calculator/free_shipping.rb
spree_core-3.2.4 app/models/spree/calculator/free_shipping.rb
spree_core-3.2.3 app/models/spree/calculator/free_shipping.rb
spree_core-3.2.2 app/models/spree/calculator/free_shipping.rb
spree_core-3.2.1 app/models/spree/calculator/free_shipping.rb
spree_core-3.2.0 app/models/spree/calculator/free_shipping.rb
spree_core-3.2.0.rc3 app/models/spree/calculator/free_shipping.rb
spree_core-3.2.0.rc2 app/models/spree/calculator/free_shipping.rb