From 73fa6295ecaeac77ad6de3cc44dafe85b607ce3f Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Wed, 1 Mar 2023 14:10:58 +1100 Subject: [PATCH] Simplify shipping method selection code --- app/services/order_available_shipping_methods.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/services/order_available_shipping_methods.rb b/app/services/order_available_shipping_methods.rb index b9a6cb3a7e..0a2cdd15ba 100644 --- a/app/services/order_available_shipping_methods.rb +++ b/app/services/order_available_shipping_methods.rb @@ -14,14 +14,12 @@ class OrderAvailableShippingMethods def to_a return [] if distributor.blank? - shipping_methods = shipping_methods_before_tag_rules_applied - tag_rules.filter(shipping_methods) end private - def shipping_methods_before_tag_rules_applied + def shipping_methods if order_cycle.nil? || order_cycle.simple? distributor.shipping_methods else