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 deprecation warnings

Damian Legawiec8d199fa9c9a2
diff --git a/spree/core/db/sample_data/orders.rb b/spree/core/db/sample_data/orders.rb
index b3857c54aa..5d0b9b3554 100644
--- a/spree/core/db/sample_data/orders.rb
+++ b/spree/core/db/sample_data/orders.rb
@@ -76,7 +76,7 @@ unless orders[1].line_items.any?
).save!
end
-orders.each(&:create_proposed_fulfillments)
+orders.each(&:rebuild_fulfillments!)
Spree::Order.where(id: orders.map(&:id)).update_all(status: 'placed', completed_at: Time.current - 1.day)
@@ -120,7 +120,7 @@ if method
credit_card.save!
orders.each do |order|
- order.update_with_updater!
+ order.recalculate_totals!
payment = order.payments.where(
amount: BigDecimal(order.total, 4),
source: credit_card.clone,
diff --git a/spree/core/db/sample_data/wholesale.rb b/spree/core/db/sample_data/wholesale.rb
index 7fbe5804a7..b45e0a2969 100644
--- a/spree/core/db/sample_data/wholesale.rb
+++ b/spree/core/db/sample_data/wholesale.rb
@@ -6,9 +6,9 @@ store = Spree::Store.default
wholesale_group = store.customer_groups.find_or_create_by!(name: Spree::Seeds::CustomerGroups::WHOLESALE_NAME)
-buyer = Spree.user_class.find_by(email: '[email protected]')
+buyer = Spree.customer_class.find_by(email: '[email protected]')
if buyer.nil?
- buyer = Spree.user_class.new(
+ buyer = Spree.customer_class.new(
password: 'spree123',
password_confirmation: 'spree123',