Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fix issue with payment validation.

Matthew Kennedye6808aa01f00
diff --git a/core/app/models/spree/payment_method.rb b/core/app/models/spree/payment_method.rb
index 0da9d75d43..dc97d57e0f 100644
--- a/core/app/models/spree/payment_method.rb
+++ b/core/app/models/spree/payment_method.rb
@@ -79,7 +79,7 @@ module Spree
end
def available_for_store?(store)
- return false if store.blank? || store_ids.empty?
+ return true if store.blank?
store_ids.include?(store.id)
end
diff --git a/core/app/models/spree/store.rb b/core/app/models/spree/store.rb
index 442c531b8a..3edce8a407 100644
--- a/core/app/models/spree/store.rb
+++ b/core/app/models/spree/store.rb
@@ -21,8 +21,6 @@ module Spree
has_one_attached :logo
has_one_attached :mailer_logo
- has_many :payment_methods
-
validates :mailer_logo, content_type: ['image/png', 'image/jpg', 'image/jpeg']
before_save :ensure_default_exists_and_is_unique