diff --git a/core/lib/tasks/payment_method.rake b/core/lib/tasks/payment_method.rake index b02650ed46d..b9981d3c044 100644 --- a/core/lib/tasks/payment_method.rake +++ b/core/lib/tasks/payment_method.rake @@ -5,7 +5,7 @@ namespace :payment_method do "which happens after switching Payment Service Provider." task deactivate_unsupported_payment_methods: :environment do Spree::PaymentMethod.pluck(:id, :type).select do |id, type| - ActiveSupport::Dependencies.constantize(type) + type.constantize rescue NameError fix_payment_method_record(id, type) end