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.

Fixed: `Store#current` - removed deprecation, use dependencies (#12080)

Damian Legawiec8eb84f160670
diff --git a/core/app/models/spree/store.rb b/core/app/models/spree/store.rb
index 535e9454a5..800423d8cd 100644
--- a/core/app/models/spree/store.rb
+++ b/core/app/models/spree/store.rb
@@ -110,11 +110,7 @@ module Spree
after_commit :clear_cache
def self.current(url = nil)
- Spree::Deprecation.warn(<<-DEPRECATION, caller)
- `Spree::Store.current` is deprecated and will be removed in Spree 5.0
- Please use `Spree::Stores::FindCurrent.new(url: "https://example.com").execute` instead
- DEPRECATION
- Stores::FindCurrent.new(url: url).execute
+ Spree::Dependencies.current_store_finder.constantize.new(url: url).execute
end
# FIXME: we need to drop `or_initialize` in v5