remove custom calculator no longer needed with the new Spree shipping calculator.
This commit is contained in:
@@ -17,15 +17,4 @@ Spree::Order.class_eval do
|
||||
end
|
||||
end
|
||||
|
||||
# UPGRADE_CHECK this works as of spree 1.2.0. check function for changes on upgrade
|
||||
def available_shipping_methods(display_on = nil)
|
||||
return [] unless ship_address
|
||||
all_methods = Spree::ShippingMethod.all_available(self, display_on)
|
||||
|
||||
if self.digital?
|
||||
all_methods.detect { |m| m.calculator.class == Spree::Calculator::DigitalDelivery }.try { |d| [d] } || all_methods
|
||||
else
|
||||
all_methods
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user