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 Store#current deprecation warning

Damian Legawiec82b7e76a6778
diff --git a/core/app/models/spree/store.rb b/core/app/models/spree/store.rb
index 7749a00e9b..1203118e24 100644
--- a/core/app/models/spree/store.rb
+++ b/core/app/models/spree/store.rb
@@ -49,7 +49,7 @@ module Spree
def self.current(url = nil)
ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
- `Spree::Store.default` is deprecated and will be removed in Spree 5
+ `Spree::Store.current` is deprecated and will be removed in Spree 5
Spree::Stores::FindCurrent.new(url: "http://example.com") instead
DEPRECATION
Stores::FindCurrent.new(url: url).execute
diff --git a/frontend/spec/support/shared_contexts/checkout_address_book.rb b/frontend/spec/support/shared_contexts/checkout_address_book.rb
index 5a66deb3cc..6a925e8c00 100644
--- a/frontend/spec/support/shared_contexts/checkout_address_book.rb
+++ b/frontend/spec/support/shared_contexts/checkout_address_book.rb
@@ -1,6 +1,6 @@
shared_context 'checkout address book' do
before do
- @store = Spree::Store.current || create(:store)
+ @store = Spree::Store.default || create(:store)
@state = Spree::State.all.first || create(:state)
@zone = Spree::Zone.global || create(:global_zone)
@zone.countries << Spree::Country.all