spree_core 6.0.4 → 6.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/jobs/spree/imports/create_rows_job.rb +4 -2
- data/app/jobs/spree/imports/process_rows_job.rb +4 -2
- data/app/jobs/spree/products/auto_match_taxons_job.rb +5 -2
- data/app/jobs/spree/search_provider/index_job.rb +8 -0
- data/app/jobs/spree/search_provider/remove_job.rb +3 -0
- data/app/jobs/spree/stock_locations/stock_items/create_job.rb +5 -2
- data/app/mailers/spree/base_mailer.rb +1 -1
- data/app/models/concerns/spree/acted_by.rb +2 -2
- data/app/models/concerns/spree/customer_methods.rb +6 -4
- data/app/models/concerns/spree/deprecated_customer_alias.rb +11 -3
- data/app/models/concerns/spree/derived_number.rb +1 -1
- data/app/models/concerns/spree/has_custom_fields.rb +12 -10
- data/app/models/concerns/spree/integrations_concern.rb +5 -3
- data/app/models/concerns/spree/label_translatable.rb +4 -4
- data/app/models/concerns/spree/metadata.rb +3 -3
- data/app/models/concerns/spree/presentation_translatable.rb +1 -1
- data/app/models/concerns/spree/purchase/addresses.rb +8 -5
- data/app/models/concerns/spree/purchase/deprecated_aliases.rb +2 -2
- data/app/models/concerns/spree/stores/markets.rb +4 -2
- data/app/models/concerns/spree/user_address.rb +5 -2
- data/app/models/concerns/spree/user_methods.rb +2 -2
- data/app/models/spree/address.rb +29 -14
- data/app/models/spree/asset.rb +3 -3
- data/app/models/spree/base.rb +1 -1
- data/app/models/spree/calculator/shipping/flat_rate.rb +6 -4
- data/app/models/spree/cart.rb +2 -2
- data/app/models/spree/category.rb +8 -6
- data/app/models/spree/classification.rb +2 -2
- data/app/models/spree/current.rb +19 -0
- data/app/models/spree/custom_field.rb +6 -6
- data/app/models/spree/custom_field_definition.rb +10 -7
- data/app/models/spree/delivery_method.rb +21 -15
- data/app/models/spree/delivery_rate.rb +1 -1
- data/app/models/spree/digital.rb +1 -1
- data/app/models/spree/digital_asset.rb +2 -2
- data/app/models/spree/digital_link.rb +4 -4
- data/app/models/spree/export.rb +29 -2
- data/app/models/spree/fulfillment/custom_events.rb +18 -10
- data/app/models/spree/fulfillment.rb +30 -23
- data/app/models/spree/fulfillment_item.rb +3 -3
- data/app/models/spree/fulfilment_changer.rb +1 -1
- data/app/models/spree/gift_card.rb +12 -12
- data/app/models/spree/import.rb +23 -15
- data/app/models/spree/import_row.rb +6 -6
- data/app/models/spree/inventory_unit.rb +1 -1
- data/app/models/spree/invitation.rb +8 -4
- data/app/models/spree/line_item.rb +10 -8
- data/app/models/spree/media.rb +2 -2
- data/app/models/spree/metafield.rb +1 -1
- data/app/models/spree/metafield_definition.rb +1 -1
- data/app/models/spree/metafields.rb +2 -2
- data/app/models/spree/option_type.rb +26 -0
- data/app/models/spree/option_value.rb +3 -3
- data/app/models/spree/order.rb +87 -45
- data/app/models/spree/order_inventory.rb +2 -2
- data/app/models/spree/order_merger.rb +2 -2
- data/app/models/spree/order_updater.rb +34 -20
- data/app/models/spree/payment.rb +8 -8
- data/app/models/spree/payment_method.rb +11 -9
- data/app/models/spree/price.rb +19 -8
- data/app/models/spree/price_list.rb +12 -6
- data/app/models/spree/price_rules/zone_rule.rb +1 -1
- data/app/models/spree/product.rb +26 -24
- data/app/models/spree/product_category.rb +3 -3
- data/app/models/spree/promotion/rules/category.rb +27 -10
- data/app/models/spree/promotion/rules/country.rb +1 -1
- data/app/models/spree/promotion/rules/taxon.rb +4 -2
- data/app/models/spree/promotion/rules/user.rb +1 -1
- data/app/models/spree/promotion_action.rb +1 -1
- data/app/models/spree/promotion_rule_category.rb +5 -5
- data/app/models/spree/promotion_rule_taxon.rb +2 -2
- data/app/models/spree/prototype.rb +4 -1
- data/app/models/spree/return_authorization_reason.rb +3 -3
- data/app/models/spree/return_reason.rb +1 -1
- data/app/models/spree/search_provider/base.rb +2 -2
- data/app/models/spree/search_provider.rb +7 -5
- data/app/models/spree/shipment.rb +4 -1
- data/app/models/spree/shipping_method.rb +4 -1
- data/app/models/spree/shipping_rate.rb +1 -1
- data/app/models/spree/stock/coordinator.rb +2 -2
- data/app/models/spree/stock/estimator.rb +7 -5
- data/app/models/spree/stock/package.rb +10 -8
- data/app/models/spree/stock_item.rb +1 -1
- data/app/models/spree/stock_level/custom_events.rb +1 -1
- data/app/models/spree/stock_level.rb +1 -1
- data/app/models/spree/stock_location.rb +12 -8
- data/app/models/spree/stock_movement.rb +6 -6
- data/app/models/spree/stock_reservation.rb +5 -5
- data/app/models/spree/store.rb +42 -16
- data/app/models/spree/store_credit.rb +2 -2
- data/app/models/spree/store_credit_category.rb +5 -5
- data/app/models/spree/store_credit_type.rb +2 -2
- data/app/models/spree/subscriber.rb +7 -7
- data/app/models/spree/tax_rate.rb +5 -5
- data/app/models/spree/taxon.rb +3 -3
- data/app/models/spree/taxon_rule.rb +2 -2
- data/app/models/spree/taxonomy.rb +1 -1
- data/app/models/spree/variant.rb +12 -10
- data/app/models/spree/variant_media.rb +1 -1
- data/app/models/spree/wished_item.rb +1 -1
- data/app/models/spree/wishlist.rb +2 -2
- data/app/models/spree/wishlist_item/custom_events.rb +2 -2
- data/app/models/spree/zone.rb +1 -1
- data/app/models/spree/zone_member.rb +1 -1
- data/app/services/spree/carts/associate.rb +6 -2
- data/app/services/spree/carts/create.rb +1 -1
- data/app/services/spree/carts/destroy.rb +1 -1
- data/app/services/spree/carts/remove_item.rb +1 -1
- data/app/services/spree/carts/remove_line_item.rb +2 -2
- data/app/services/spree/carts/remove_out_of_stock_items.rb +3 -1
- data/app/services/spree/carts/set_quantity.rb +2 -2
- data/app/services/spree/carts/update.rb +17 -0
- data/app/services/spree/checkout/add_store_credit.rb +3 -3
- data/app/services/spree/checkout/remove_store_credit.rb +2 -2
- data/app/services/spree/imports/row_processors/product_variant.rb +19 -0
- data/app/services/spree/orders/approve.rb +3 -3
- data/app/services/spree/orders/create_user_account.rb +2 -2
- data/app/services/spree/products/auto_match_taxons.rb +5 -2
- data/app/services/spree/shipments/update.rb +2 -2
- data/app/services/spree/stock_locations/stock_items/create.rb +5 -2
- data/app/services/spree/stock_reservations/extend.rb +3 -1
- data/app/services/spree/stock_reservations/reserve.rb +3 -1
- data/app/services/spree/taxons/add_products.rb +4 -2
- data/app/services/spree/taxons/regenerate_products.rb +5 -2
- data/app/services/spree/taxons/remove_products.rb +4 -2
- data/app/workflows/spree/carts/add_item.rb +1 -1
- data/app/workflows/spree/carts/recalculate.rb +1 -1
- data/app/workflows/spree/fulfillments/update.rb +1 -1
- data/app/workflows/spree/orders/cancel.rb +3 -1
- data/app/workflows/spree/payments/capture.rb +2 -2
- data/app/workflows/spree/seller_transfers/create.rb +1 -1
- data/config/locales/en.yml +4 -0
- data/db/migrate/20260710000001_rename_taxons_to_categories.rb +1 -1
- data/db/migrate/20260728000004_rename_shipping_to_fulfillment_and_delivery.rb +1 -1
- data/db/migrate/20260806000001_add_store_id_to_spree_tax_rates_and_categories.rb +1 -1
- data/db/migrate/20260807130001_add_country_state_codes_to_consumers.rb +1 -1
- data/db/migrate/20260809000001_rename_metafields_to_custom_fields.rb +1 -1
- data/db/migrate/20260809150001_promote_shipping_categories_to_delivery_profiles.rb +1 -1
- data/db/migrate/20260811000001_add_delivery_tracking_to_fulfillments.rb +1 -1
- data/db/migrate/20260824000001_add_store_to_spree_media.rb +1 -1
- data/db/migrate/20260828100001_unify_import_and_export_tenancy.rb +1 -1
- data/db/migrate/20261016000001_remove_default_from_spree_tax_rates_included_in_price.rb +1 -1
- data/lib/spree/agent_tools/default_catalog.rb +2 -2
- data/lib/spree/agent_tools/legacy_tools.rb +1 -1
- data/lib/spree/core/dependencies.rb +10 -10
- data/lib/spree/core/engine.rb +4 -0
- data/lib/spree/core/number_generator.rb +4 -3
- data/lib/spree/core/preferences/preferable.rb +1 -1
- data/lib/spree/core/preferences/preferable_class_methods.rb +5 -1
- data/lib/spree/core/pricing/resolver.rb +2 -2
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/core.rb +37 -10
- data/lib/spree/i18n.rb +6 -2
- data/lib/spree/localized_number.rb +1 -1
- data/lib/spree/removed_apis.rb +274 -0
- data/lib/spree/reporting/default_vocabulary.rb +1 -1
- data/lib/spree/testing_support/factories/digital_asset_factory.rb +1 -1
- data/lib/spree/testing_support/factories/stock_level_factory.rb +1 -1
- data/lib/spree/testing_support/factories/taxon_factory.rb +1 -1
- data/lib/spree/testing_support/factories/taxonomy_factory.rb +1 -1
- data/lib/spree/testing_support/factories/wishlist_item_factory.rb +1 -1
- data/lib/spree/testing_support/i18n.rb +7 -2
- data/lib/spree/testing_support/order_walkthrough.rb +5 -2
- data/lib/spree/upgrades/5_6_to_6_0/manifest.yml +14 -14
- data/lib/tasks/carts_migration.rake +1 -1
- data/lib/tasks/categories_and_collections.rake +1 -1
- data/lib/tasks/deliveries_migration.rake +1 -1
- data/lib/tasks/delivery_method_rules_migration.rake +1 -1
- data/lib/tasks/delivery_migration.rake +1 -1
- data/lib/tasks/delivery_profiles_migration.rake +2 -2
- data/lib/tasks/fold_store_credit_categories.rake +1 -1
- data/lib/tasks/migrate_country_state_codes.rake +1 -1
- data/lib/tasks/migrate_returns.rake +4 -4
- data/lib/tasks/migrate_rich_text_to_columns.rake +1 -1
- data/lib/tasks/store_settings.rake +1 -1
- data/lib/tasks/typed_stock_movements_migration.rake +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d62d8e35b3c55f0a54ef1afb0e8270bfb1391899f12b3959ca6959324953e84d
|
|
4
|
+
data.tar.gz: bd148a4547773fff7263a12765b45f5c2573612190ca06293204a7c25c73d775
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cacd3ad126f55a1cf7ec44ed1d243041bf1617ea3a38a303373995c39a96c9e2b6ab6d7eaf17f11ba4ba0bca7ee63dba8a4b3b3e7185473849afdd6a99afde68
|
|
7
|
+
data.tar.gz: 27d668eb15bc37af05a04143de22cabc308dec4c14d2e63a15b8697d7c97ee3e18eedd82ce7844aeae6528abda210a629839f5fe21e507cd41be861d287b78e5
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
module Spree
|
|
2
2
|
module Imports
|
|
3
|
-
# @deprecated Use {Spree::Imports::ProcessJob}; removed in 6.
|
|
3
|
+
# @deprecated Use {Spree::Imports::ProcessJob}; removed in 6.3.
|
|
4
4
|
class CreateRowsJob < Spree::Imports::BaseJob
|
|
5
5
|
def perform(import_id)
|
|
6
|
-
Spree::Deprecation.warn(
|
|
6
|
+
Spree::Deprecation.warn(
|
|
7
|
+
'Spree::Imports::CreateRowsJob is deprecated and will be removed in Spree 6.3. Use Spree::Imports::ProcessJob instead.'
|
|
8
|
+
)
|
|
7
9
|
Spree::Imports::ProcessJob.perform_now(import_id)
|
|
8
10
|
end
|
|
9
11
|
end
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
module Spree
|
|
2
2
|
module Imports
|
|
3
3
|
# @deprecated Use {Spree::Imports::ProcessJob} with skip_row_creation:
|
|
4
|
-
# true; removed in 6.
|
|
4
|
+
# true; removed in 6.3.
|
|
5
5
|
class ProcessRowsJob < Spree::Imports::BaseJob
|
|
6
6
|
def perform(import_id)
|
|
7
|
-
Spree::Deprecation.warn(
|
|
7
|
+
Spree::Deprecation.warn(
|
|
8
|
+
'Spree::Imports::ProcessRowsJob is deprecated and will be removed in Spree 6.3. Use Spree::Imports::ProcessJob instead.'
|
|
9
|
+
)
|
|
8
10
|
Spree::Imports::ProcessJob.perform_now(import_id, skip_row_creation: true)
|
|
9
11
|
end
|
|
10
12
|
end
|
|
@@ -2,10 +2,13 @@ module Spree
|
|
|
2
2
|
module Products
|
|
3
3
|
# @deprecated Renamed to AutoMatchCollectionsJob in 6.0 (behavior moved to
|
|
4
4
|
# collections). Subclasses it so jobs enqueued under the old class name still
|
|
5
|
-
# deserialize and run; removed in 6.
|
|
5
|
+
# deserialize and run; removed in 6.3.
|
|
6
6
|
class AutoMatchTaxonsJob < AutoMatchCollectionsJob
|
|
7
7
|
def perform(product_id)
|
|
8
|
-
Spree::Deprecation.warn(
|
|
8
|
+
Spree::Deprecation.warn(
|
|
9
|
+
'Spree::Products::AutoMatchTaxonsJob is deprecated and will be removed in Spree 6.3. ' \
|
|
10
|
+
'Use Spree::Products::AutoMatchCollectionsJob instead.'
|
|
11
|
+
)
|
|
9
12
|
super
|
|
10
13
|
end
|
|
11
14
|
end
|
|
@@ -3,6 +3,14 @@ module Spree
|
|
|
3
3
|
class IndexJob < Spree::BaseJob
|
|
4
4
|
queue_as Spree.queues.search
|
|
5
5
|
|
|
6
|
+
# A bulk write (CSV import, sample data) enqueues thousands of these at
|
|
7
|
+
# once; run in parallel they flood the search service with requests and
|
|
8
|
+
# it answers 429 Too Many Requests. Run one search job per store at a
|
|
9
|
+
# time; the rest wait as blocked executions, so no update is lost. Shared
|
|
10
|
+
# with RemoveJob. The duration only has to outlive one job; expiry lifts
|
|
11
|
+
# the cap, it doesn't drop jobs. Solid Queue only (no-op elsewhere).
|
|
12
|
+
limits_concurrency to: 1, key: ->(*, store_id) { store_id }, group: 'spree_search', duration: 5.minutes if respond_to?(:limits_concurrency)
|
|
13
|
+
|
|
6
14
|
# Search providers are external services (Meilisearch, etc.); a transient 5xx or
|
|
7
15
|
# network blip should not drop the index update.
|
|
8
16
|
retry_on StandardError, wait: :polynomially_longer, attempts: 5
|
|
@@ -3,6 +3,9 @@ module Spree
|
|
|
3
3
|
class RemoveJob < Spree::BaseJob
|
|
4
4
|
queue_as Spree.queues.search
|
|
5
5
|
|
|
6
|
+
# Shares IndexJob's per-store limit, see there.
|
|
7
|
+
limits_concurrency to: 1, key: ->(*, store_id) { store_id }, group: 'spree_search', duration: 5.minutes if respond_to?(:limits_concurrency)
|
|
8
|
+
|
|
6
9
|
# Search providers are external services; broad retry covers network blips and 5xx.
|
|
7
10
|
retry_on StandardError, wait: :polynomially_longer, attempts: 5
|
|
8
11
|
# Must come after `retry_on StandardError` so DeserializationError lands in discard
|
|
@@ -3,10 +3,13 @@ module Spree
|
|
|
3
3
|
module StockItems
|
|
4
4
|
# @deprecated Renamed to Spree::StockLocations::StockLevels::CreateJob in 6.0.
|
|
5
5
|
# Subclasses it so jobs enqueued under the old class name before the deploy
|
|
6
|
-
# still deserialize and run; removed in 6.
|
|
6
|
+
# still deserialize and run; removed in 6.3.
|
|
7
7
|
class CreateJob < StockLevels::CreateJob
|
|
8
8
|
def perform(*args)
|
|
9
|
-
Spree::Deprecation.warn(
|
|
9
|
+
Spree::Deprecation.warn(
|
|
10
|
+
'Spree::StockLocations::StockItems::CreateJob is deprecated and will be removed in Spree 6.3. ' \
|
|
11
|
+
'Use Spree::StockLocations::StockLevels::CreateJob instead.'
|
|
12
|
+
)
|
|
10
13
|
super
|
|
11
14
|
end
|
|
12
15
|
end
|
|
@@ -29,7 +29,7 @@ module Spree
|
|
|
29
29
|
@_store_locale_active = true
|
|
30
30
|
begin
|
|
31
31
|
Spree::Locales::SetFallbackLocaleForStore.new.call(store: store) if store
|
|
32
|
-
I18n.with_locale(locale, &block)
|
|
32
|
+
Spree::Current.with_content_locale(store&.default_market&.default_locale) { I18n.with_locale(locale, &block) }
|
|
33
33
|
ensure
|
|
34
34
|
@_store_locale_active = previously_active
|
|
35
35
|
Mobility.store_based_fallbacks = previous_fallbacks
|
|
@@ -178,7 +178,7 @@ module Spree
|
|
|
178
178
|
# Prepended rather than defined outright, so `super` reaches the
|
|
179
179
|
# generated reader.
|
|
180
180
|
#
|
|
181
|
-
# Removed in 6.
|
|
181
|
+
# Removed in 6.3, once the backfill is a release behind.
|
|
182
182
|
def define_transitional_actor_reader(name)
|
|
183
183
|
transitional_actor_readers.module_eval do
|
|
184
184
|
define_method(name) do
|
|
@@ -188,7 +188,7 @@ module Spree
|
|
|
188
188
|
Spree::Deprecation.warn(
|
|
189
189
|
"#{self.class.name}##{name} resolved through #{Spree.admin_user_class} because " \
|
|
190
190
|
"#{name}_type is blank. Run `rake spree:upgrade:backfill_actor_types`; the fallback " \
|
|
191
|
-
'is removed in Spree 6.
|
|
191
|
+
'is removed in Spree 6.3.'
|
|
192
192
|
)
|
|
193
193
|
|
|
194
194
|
# Fill the type across the whole lazily-preloaded group, not just
|
|
@@ -295,14 +295,14 @@ module Spree
|
|
|
295
295
|
# @deprecated Carts are {Spree::Cart} since 6.0, so an incomplete order is
|
|
296
296
|
# a backoffice draft rather than the customer's cart. Use
|
|
297
297
|
# +carts.where(store: store)+ for carts, or +orders.drafts+ for drafts.
|
|
298
|
-
# Removed in Spree 6.
|
|
298
|
+
# Removed in Spree 6.3.
|
|
299
299
|
# @param [Spree::Store] store
|
|
300
300
|
# @param [Hash] options
|
|
301
301
|
# @option options [Array<Symbol>] :includes
|
|
302
302
|
# @return [Spree::Order]
|
|
303
303
|
def last_incomplete_spree_order(store, options = {})
|
|
304
304
|
Spree::Deprecation.warn(
|
|
305
|
-
'Spree::CustomerMethods#last_incomplete_spree_order is deprecated and will be removed in Spree 6.
|
|
305
|
+
'Spree::CustomerMethods#last_incomplete_spree_order is deprecated and will be removed in Spree 6.3. ' \
|
|
306
306
|
'Carts are Spree::Cart since 6.0 and this returns draft orders; use #carts for the customer\'s carts.'
|
|
307
307
|
)
|
|
308
308
|
|
|
@@ -393,9 +393,11 @@ module Spree
|
|
|
393
393
|
# every column carrying personal data rather than three on this row —
|
|
394
394
|
# the address book, the address snapshots on past orders, gateway
|
|
395
395
|
# profiles, OAuth identities and live sessions all outlived this method.
|
|
396
|
-
# Removed in Spree 6.
|
|
396
|
+
# Removed in Spree 6.3.
|
|
397
397
|
def scramble_email_and_names
|
|
398
|
-
Spree::Deprecation.warn(
|
|
398
|
+
Spree::Deprecation.warn(
|
|
399
|
+
'Spree::CustomerMethods#scramble_email_and_names is deprecated and will be removed in Spree 6.3. Use Spree::Customers::Anonymize instead.'
|
|
400
|
+
)
|
|
399
401
|
|
|
400
402
|
Spree.customer_anonymize_workflow.call(customer: self, store: Spree::Current.store).success?
|
|
401
403
|
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Spree
|
|
2
2
|
# Deprecation shim for the 6.0 user_id -> customer_id / belongs_to :user -> :customer
|
|
3
3
|
# rename. Included by customer-facing models so `.user` / `.user_id` keep working
|
|
4
|
-
#
|
|
4
|
+
# until Spree 6.3.
|
|
5
5
|
module DeprecatedCustomerAlias
|
|
6
6
|
extend ActiveSupport::Concern
|
|
7
7
|
|
|
@@ -10,12 +10,20 @@ module Spree
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def user
|
|
13
|
-
|
|
13
|
+
if defined?(Spree::Deprecation)
|
|
14
|
+
Spree::Deprecation.warn(
|
|
15
|
+
"#{self.class}#user is deprecated and will be removed in Spree 6.3. Use #customer instead."
|
|
16
|
+
)
|
|
17
|
+
end
|
|
14
18
|
customer
|
|
15
19
|
end
|
|
16
20
|
|
|
17
21
|
def user=(value)
|
|
18
|
-
|
|
22
|
+
if defined?(Spree::Deprecation)
|
|
23
|
+
Spree::Deprecation.warn(
|
|
24
|
+
"#{self.class}#user= is deprecated and will be removed in Spree 6.3. Use #customer= instead."
|
|
25
|
+
)
|
|
26
|
+
end
|
|
19
27
|
self.customer = value
|
|
20
28
|
end
|
|
21
29
|
end
|
|
@@ -11,7 +11,7 @@ module Spree
|
|
|
11
11
|
#
|
|
12
12
|
# Rows created before 6.0 keep their stored number, so gateway references
|
|
13
13
|
# and packing slips already in the wild still resolve. New rows never write
|
|
14
|
-
# the column — it is frozen legacy data awaiting the 6.
|
|
14
|
+
# the column — it is frozen legacy data awaiting the 6.3 drop.
|
|
15
15
|
module DerivedNumber
|
|
16
16
|
extend ActiveSupport::Concern
|
|
17
17
|
|
|
@@ -22,19 +22,21 @@ module Spree
|
|
|
22
22
|
[namespace, key]
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
# Deprecated 6.0 names, removed in 6.
|
|
25
|
+
# Deprecated 6.0 names, removed in 6.3.
|
|
26
26
|
def ensure_metafield_definition_exists!(key_with_namespace, store: Spree::Current.store)
|
|
27
|
-
Spree::Deprecation.warn(
|
|
27
|
+
Spree::Deprecation.warn(
|
|
28
|
+
'ensure_metafield_definition_exists! is deprecated and will be removed in Spree 6.3. Use ensure_custom_field_definition_exists! instead.'
|
|
29
|
+
)
|
|
28
30
|
ensure_custom_field_definition_exists!(key_with_namespace, store: store)
|
|
29
31
|
end
|
|
30
32
|
|
|
31
33
|
def with_metafield_key(key_with_namespace)
|
|
32
|
-
Spree::Deprecation.warn('.with_metafield_key is deprecated and will be removed in Spree 6.
|
|
34
|
+
Spree::Deprecation.warn('.with_metafield_key is deprecated and will be removed in Spree 6.3. Use .with_custom_field_key instead.')
|
|
33
35
|
with_custom_field_key(key_with_namespace)
|
|
34
36
|
end
|
|
35
37
|
|
|
36
38
|
def with_metafield_key_value(key_with_namespace, value)
|
|
37
|
-
Spree::Deprecation.warn('.with_metafield_key_value is deprecated and will be removed in Spree 6.
|
|
39
|
+
Spree::Deprecation.warn('.with_metafield_key_value is deprecated and will be removed in Spree 6.3. Use .with_custom_field_key_value instead.')
|
|
38
40
|
with_custom_field_key_value(key_with_namespace, value)
|
|
39
41
|
end
|
|
40
42
|
end
|
|
@@ -46,7 +48,7 @@ module Spree
|
|
|
46
48
|
has_many :custom_fields, -> { includes(:custom_field_definition) }, as: :resource, inverse_of: :resource, class_name: 'Spree::CustomField', dependent: :destroy
|
|
47
49
|
has_many :storefront_custom_fields, -> { includes(:custom_field_definition).storefront_visible }, as: :resource, class_name: 'Spree::CustomField'
|
|
48
50
|
|
|
49
|
-
# Deprecated 6.0 association names, removed in 6.
|
|
51
|
+
# Deprecated 6.0 association names, removed in 6.3. `private_metafields`
|
|
50
52
|
# has no replacement — read `custom_fields` and filter, or query
|
|
51
53
|
# Spree::CustomField.admin_only directly.
|
|
52
54
|
has_many :metafields, -> { includes(:custom_field_definition) }, as: :resource, class_name: 'Spree::CustomField', deprecated: true
|
|
@@ -170,26 +172,26 @@ module Spree
|
|
|
170
172
|
custom_fields.with_key(namespace, key).exists?
|
|
171
173
|
end
|
|
172
174
|
|
|
173
|
-
# Deprecated 6.0 names, removed in 6.
|
|
175
|
+
# Deprecated 6.0 names, removed in 6.3.
|
|
174
176
|
def set_metafield(definition_or_key, value)
|
|
175
|
-
Spree::Deprecation.warn('#set_metafield is deprecated and will be removed in Spree 6.
|
|
177
|
+
Spree::Deprecation.warn('#set_metafield is deprecated and will be removed in Spree 6.3. Use #set_custom_field instead.')
|
|
176
178
|
set_custom_field(definition_or_key, value)
|
|
177
179
|
end
|
|
178
180
|
|
|
179
181
|
def get_metafield(key_with_namespace)
|
|
180
|
-
Spree::Deprecation.warn('#get_metafield is deprecated and will be removed in Spree 6.
|
|
182
|
+
Spree::Deprecation.warn('#get_metafield is deprecated and will be removed in Spree 6.3. Use #get_custom_field instead.')
|
|
181
183
|
get_custom_field(key_with_namespace)
|
|
182
184
|
end
|
|
183
185
|
|
|
184
186
|
def has_metafield?(key_with_namespace)
|
|
185
|
-
Spree::Deprecation.warn('#has_metafield? is deprecated and will be removed in Spree 6.
|
|
187
|
+
Spree::Deprecation.warn('#has_metafield? is deprecated and will be removed in Spree 6.3. Use #has_custom_field? instead.')
|
|
186
188
|
has_custom_field?(key_with_namespace)
|
|
187
189
|
end
|
|
188
190
|
|
|
189
191
|
# Legacy payloads key the definition as `metafield_definition_id`, which
|
|
190
192
|
# the new writer rejects — translate rather than silently dropping them.
|
|
191
193
|
def metafields_attributes=(attributes)
|
|
192
|
-
Spree::Deprecation.warn('#metafields_attributes= is deprecated and will be removed in Spree 6.
|
|
194
|
+
Spree::Deprecation.warn('#metafields_attributes= is deprecated and will be removed in Spree 6.3. Use #custom_fields_attributes= instead.')
|
|
193
195
|
|
|
194
196
|
attributes = attributes.values if attributes.is_a?(Hash)
|
|
195
197
|
translated = attributes.map do |attrs|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
module Spree
|
|
2
|
-
# @deprecated Use {Spree::Current.integrations}; removed in Spree 6.
|
|
2
|
+
# @deprecated Use {Spree::Current.integrations}; removed in Spree 6.3.
|
|
3
3
|
#
|
|
4
4
|
# Nothing in Spree calls these — the per-request integration set lives on
|
|
5
5
|
# {Spree::Current} — but the concern sits on Spree::Base, so every model has
|
|
@@ -7,7 +7,8 @@ module Spree
|
|
|
7
7
|
module IntegrationsConcern
|
|
8
8
|
def store_integrations
|
|
9
9
|
Spree::Deprecation.warn(
|
|
10
|
-
'Spree::IntegrationsConcern#store_integrations is deprecated and will be removed in Spree 6.
|
|
10
|
+
'Spree::IntegrationsConcern#store_integrations is deprecated and will be removed in Spree 6.3. ' \
|
|
11
|
+
'Use Spree::Current.integrations instead.'
|
|
11
12
|
)
|
|
12
13
|
|
|
13
14
|
Spree::Current.integrations
|
|
@@ -15,7 +16,8 @@ module Spree
|
|
|
15
16
|
|
|
16
17
|
def store_integration(name)
|
|
17
18
|
Spree::Deprecation.warn(
|
|
18
|
-
'Spree::IntegrationsConcern#store_integration is deprecated and will be removed in Spree 6.
|
|
19
|
+
'Spree::IntegrationsConcern#store_integration is deprecated and will be removed in Spree 6.3. ' \
|
|
20
|
+
'Use Spree::Current.integrations.find { |integration| integration.type.to_s.demodulize.underscore == name } instead.'
|
|
19
21
|
)
|
|
20
22
|
|
|
21
23
|
Spree::Current.integrations.find { |integration| integration.type.to_s.demodulize.underscore == name }
|
|
@@ -16,7 +16,7 @@ module Spree
|
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
# @deprecated The column is +label+ since 6.0; removed in 6.
|
|
19
|
+
# @deprecated The column is +label+ since 6.0; removed in 6.3.
|
|
20
20
|
#
|
|
21
21
|
# Unlike the attribute aliases the other 6.0 renames use, this is a plain
|
|
22
22
|
# method — Mobility owns +label+, so it cannot be an alias_attribute. It
|
|
@@ -24,13 +24,13 @@ module Spree
|
|
|
24
24
|
# and +find_by(presentation:)+ name a column that no longer exists and
|
|
25
25
|
# raise. Query by +label+.
|
|
26
26
|
def presentation(*args, **kwargs)
|
|
27
|
-
Spree::Deprecation.warn("#{self.class.name}#presentation is deprecated and will be removed in Spree 6.
|
|
27
|
+
Spree::Deprecation.warn("#{self.class.name}#presentation is deprecated and will be removed in Spree 6.3. Use #label instead.")
|
|
28
28
|
label(*args, **kwargs)
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
# @deprecated See {#presentation}; removed in 6.
|
|
31
|
+
# @deprecated See {#presentation}; removed in 6.3.
|
|
32
32
|
def presentation=(value)
|
|
33
|
-
Spree::Deprecation.warn("#{self.class.name}#presentation= is deprecated and will be removed in Spree 6.
|
|
33
|
+
Spree::Deprecation.warn("#{self.class.name}#presentation= is deprecated and will be removed in Spree 6.3. Use #label= instead.")
|
|
34
34
|
self.label = value
|
|
35
35
|
end
|
|
36
36
|
end
|
|
@@ -11,7 +11,7 @@ module Spree
|
|
|
11
11
|
serialize :metadata, coder: HashSerializer
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# Deprecated alias for the renamed `metadata` column. Removed in Spree 6.
|
|
14
|
+
# Deprecated alias for the renamed `metadata` column. Removed in Spree 6.3.
|
|
15
15
|
#
|
|
16
16
|
# Only the reader and writer are bridged. The column is gone, so the attribute
|
|
17
17
|
# methods Active Record generated alongside it — `private_metadata?`,
|
|
@@ -19,12 +19,12 @@ module Spree
|
|
|
19
19
|
# `private_metadata_before_type_cast` and the rest of the dirty-tracking family
|
|
20
20
|
# — no longer exist and raise NoMethodError. Call the `metadata` equivalents.
|
|
21
21
|
def private_metadata
|
|
22
|
-
Spree::Deprecation.warn('private_metadata is deprecated and will be removed in Spree 6.
|
|
22
|
+
Spree::Deprecation.warn('private_metadata is deprecated and will be removed in Spree 6.3. Use metadata instead.')
|
|
23
23
|
metadata
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def private_metadata=(value)
|
|
27
|
-
Spree::Deprecation.warn('private_metadata= is deprecated and will be removed in Spree 6.
|
|
27
|
+
Spree::Deprecation.warn('private_metadata= is deprecated and will be removed in Spree 6.3. Use metadata= instead.')
|
|
28
28
|
self.metadata = value
|
|
29
29
|
end
|
|
30
30
|
|
|
@@ -7,7 +7,7 @@ module Spree
|
|
|
7
7
|
# of checkout addresses to the customer's defaults, and the ship→bill cloning
|
|
8
8
|
# predicate. The shipping address is canonical: use_shipping copies it
|
|
9
9
|
# onto the billing address; the reverse use_billing direction is a
|
|
10
|
-
# deprecated 6.
|
|
10
|
+
# deprecated 6.3-removal bridge. Clone callbacks are wired per model.
|
|
11
11
|
module Addresses
|
|
12
12
|
extend ActiveSupport::Concern
|
|
13
13
|
|
|
@@ -85,13 +85,16 @@ module Spree
|
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
# @deprecated The shipping address is canonical — use +use_shipping+ to
|
|
88
|
-
# copy it onto the billing address. Removed in 6.
|
|
88
|
+
# copy it onto the billing address. Removed in 6.3.
|
|
89
89
|
def use_billing=(value)
|
|
90
|
-
Spree::Deprecation.warn(
|
|
90
|
+
Spree::Deprecation.warn(
|
|
91
|
+
'use_billing is deprecated and will be removed in Spree 6.3. ' \
|
|
92
|
+
'The shipping address comes first — use use_shipping to copy it onto the billing address.'
|
|
93
|
+
)
|
|
91
94
|
@use_billing = value
|
|
92
95
|
end
|
|
93
96
|
|
|
94
|
-
# @deprecated See {#use_billing=}; removed in 6.
|
|
97
|
+
# @deprecated See {#use_billing=}; removed in 6.3.
|
|
95
98
|
# @return [Boolean]
|
|
96
99
|
def use_billing?
|
|
97
100
|
use_billing.in?([true, 'true', '1'])
|
|
@@ -194,7 +197,7 @@ module Spree
|
|
|
194
197
|
# customer's default ship address.
|
|
195
198
|
#
|
|
196
199
|
# @deprecated The shipping address is canonical (see {#use_billing=});
|
|
197
|
-
# removed in 6.
|
|
200
|
+
# removed in 6.3 together with the use_billing bridge.
|
|
198
201
|
# @return [true]
|
|
199
202
|
def clone_billing_address
|
|
200
203
|
self.ship_address = bill_address if bill_address
|
|
@@ -4,7 +4,7 @@ module Spree
|
|
|
4
4
|
# {Spree::Cart} and {Spree::Order}. Before 6.0 a cart was an incomplete
|
|
5
5
|
# order, so extensions written against 5.x (payment gateways, checkout
|
|
6
6
|
# plugins) call the legacy names on carts too. Every legacy name warns and
|
|
7
|
-
# forwards to its replacement. Removed in 6.
|
|
7
|
+
# forwards to its replacement. Removed in 6.3.
|
|
8
8
|
#
|
|
9
9
|
# Renamed columns are also registered with +alias_attribute+, so the legacy
|
|
10
10
|
# name keeps working in +where+ / +find_by+ (those paths do not warn).
|
|
@@ -80,7 +80,7 @@ module Spree
|
|
|
80
80
|
private
|
|
81
81
|
|
|
82
82
|
def warn_deprecated_name(legacy_name, current_name)
|
|
83
|
-
Spree::Deprecation.warn("#{self.class.name}##{legacy_name} is deprecated and will be removed in Spree 6.
|
|
83
|
+
Spree::Deprecation.warn("#{self.class.name}##{legacy_name} is deprecated and will be removed in Spree 6.3. Use ##{current_name} instead.")
|
|
84
84
|
end
|
|
85
85
|
end
|
|
86
86
|
end
|
|
@@ -34,9 +34,11 @@ module Spree
|
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
# @deprecated Use +default_country_code+. Removed in 6.
|
|
37
|
+
# @deprecated Use +default_country_code+. Removed in 6.3.
|
|
38
38
|
def default_country_iso_code
|
|
39
|
-
Spree::Deprecation.warn(
|
|
39
|
+
Spree::Deprecation.warn(
|
|
40
|
+
'Spree::Store#default_country_iso_code is deprecated and will be removed in Spree 6.3. Use #default_country_code instead.'
|
|
41
|
+
)
|
|
40
42
|
default_country_code
|
|
41
43
|
end
|
|
42
44
|
|
|
@@ -31,9 +31,12 @@ module Spree
|
|
|
31
31
|
# it accepts to the customer's defaults on its own (see
|
|
32
32
|
# Spree::Purchase::Addresses), and a guest who registers after placing
|
|
33
33
|
# an order has that order's addresses adopted by Spree::Customers::Create.
|
|
34
|
-
# Removed in Spree 6.
|
|
34
|
+
# Removed in Spree 6.3.
|
|
35
35
|
def persist_order_address(order)
|
|
36
|
-
Spree::Deprecation.warn(
|
|
36
|
+
Spree::Deprecation.warn(
|
|
37
|
+
'Spree::UserAddress#persist_order_address is deprecated and will be removed in Spree 6.3. ' \
|
|
38
|
+
"Checkout already promotes the addresses it accepts to the customer's defaults."
|
|
39
|
+
)
|
|
37
40
|
|
|
38
41
|
# FIXME: we should check if the User's address is associated with country accepted by Store
|
|
39
42
|
# if not we should try to find an address with valid country in User's address book
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Spree
|
|
2
2
|
# Deprecation alias for Spree::CustomerMethods, renamed from Spree::UserMethods in 6.0.
|
|
3
3
|
# True constant alias — the underlying module, its associations, and prefix (cust)
|
|
4
|
-
# are all Spree::CustomerMethods. Remove in Spree 6.
|
|
4
|
+
# are all Spree::CustomerMethods. Remove in Spree 6.3.
|
|
5
5
|
UserMethods = CustomerMethods
|
|
6
|
-
Spree::Deprecation.warn('Spree::UserMethods is deprecated and will be removed in Spree 6.
|
|
6
|
+
Spree::Deprecation.warn('Spree::UserMethods is deprecated and will be removed in Spree 6.3. Use Spree::CustomerMethods instead.')
|
|
7
7
|
end
|
data/app/models/spree/address.rb
CHANGED
|
@@ -65,7 +65,7 @@ module Spree
|
|
|
65
65
|
|
|
66
66
|
# @deprecated The canonical names are +country_code+ and +state_code+,
|
|
67
67
|
# matching the tax tables. Kept because the Store API shipped
|
|
68
|
-
# +country_iso+ and +state_abbr+; both are removed in 6.
|
|
68
|
+
# +country_iso+ and +state_abbr+; both are removed in 6.3.
|
|
69
69
|
alias_attribute :state_abbr, :state_code
|
|
70
70
|
alias_attribute :country_iso, :country_code
|
|
71
71
|
|
|
@@ -133,9 +133,9 @@ module Spree
|
|
|
133
133
|
value.to_s.gsub(/[\s-]/, '').upcase
|
|
134
134
|
end
|
|
135
135
|
|
|
136
|
-
# @deprecated Use {.normalize_postal_code}; removed in 6.
|
|
136
|
+
# @deprecated Use {.normalize_postal_code}; removed in 6.3.
|
|
137
137
|
def self.normalize_zipcode(value)
|
|
138
|
-
Spree::Deprecation.warn('Spree::Address.normalize_zipcode is deprecated and will be removed in Spree 6.
|
|
138
|
+
Spree::Deprecation.warn('Spree::Address.normalize_zipcode is deprecated and will be removed in Spree 6.3. Use .normalize_postal_code instead.')
|
|
139
139
|
normalize_postal_code(value)
|
|
140
140
|
end
|
|
141
141
|
|
|
@@ -144,9 +144,11 @@ module Spree
|
|
|
144
144
|
self.class.normalize_postal_code(postal_code)
|
|
145
145
|
end
|
|
146
146
|
|
|
147
|
-
# @deprecated Use {#normalized_postal_code}; removed in 6.
|
|
147
|
+
# @deprecated Use {#normalized_postal_code}; removed in 6.3.
|
|
148
148
|
def normalized_zipcode
|
|
149
|
-
Spree::Deprecation.warn(
|
|
149
|
+
Spree::Deprecation.warn(
|
|
150
|
+
'Spree::Address#normalized_zipcode is deprecated and will be removed in Spree 6.3. Use #normalized_postal_code instead.'
|
|
151
|
+
)
|
|
150
152
|
normalized_postal_code
|
|
151
153
|
end
|
|
152
154
|
|
|
@@ -166,7 +168,7 @@ module Spree
|
|
|
166
168
|
params.delete(:country_id)
|
|
167
169
|
params.delete(:state_id)
|
|
168
170
|
|
|
169
|
-
# Legacy write names accepted until 6.
|
|
171
|
+
# Legacy write names accepted until 6.5; the columns are country_code
|
|
170
172
|
# and state_code. The renamed name and postal-code columns need no entry
|
|
171
173
|
# here — alias_attribute resolves those inside `where` too, while these
|
|
172
174
|
# two are not attribute aliases.
|
|
@@ -239,19 +241,31 @@ module Spree
|
|
|
239
241
|
|
|
240
242
|
# @deprecated The address's owner may be a customer, a company node or a
|
|
241
243
|
# seller, so {#owner} replaces the customer-only association. Removed in
|
|
242
|
-
# Spree 6.
|
|
244
|
+
# Spree 6.3.
|
|
243
245
|
def user
|
|
244
|
-
|
|
246
|
+
if defined?(Spree::Deprecation)
|
|
247
|
+
Spree::Deprecation.warn(
|
|
248
|
+
'Spree::Address#user is deprecated and will be removed in Spree 6.3. Use #owner instead.'
|
|
249
|
+
)
|
|
250
|
+
end
|
|
245
251
|
customer_owner
|
|
246
252
|
end
|
|
247
253
|
|
|
248
254
|
def user=(value)
|
|
249
|
-
|
|
255
|
+
if defined?(Spree::Deprecation)
|
|
256
|
+
Spree::Deprecation.warn(
|
|
257
|
+
'Spree::Address#user= is deprecated and will be removed in Spree 6.3. Use #owner= instead.'
|
|
258
|
+
)
|
|
259
|
+
end
|
|
250
260
|
self.owner = value
|
|
251
261
|
end
|
|
252
262
|
|
|
253
263
|
def user_id
|
|
254
|
-
|
|
264
|
+
if defined?(Spree::Deprecation)
|
|
265
|
+
Spree::Deprecation.warn(
|
|
266
|
+
'Spree::Address#user_id is deprecated and will be removed in Spree 6.3. Use #owner_id instead.'
|
|
267
|
+
)
|
|
268
|
+
end
|
|
255
269
|
owner_id if customer_owned?
|
|
256
270
|
end
|
|
257
271
|
|
|
@@ -322,11 +336,12 @@ module Spree
|
|
|
322
336
|
# @deprecated Overriding Ruby's +Object#clone+ was a mistake: this returns
|
|
323
337
|
# a value copy with the owner, label and metadata stripped, which is not
|
|
324
338
|
# what +clone+ means anywhere else in Ruby. The override is removed in
|
|
325
|
-
# Spree 6.
|
|
339
|
+
# Spree 6.3 and +clone+ becomes the standard shallow copy. Use
|
|
326
340
|
# {#snapshot} for the ownerless copy a purchase keeps.
|
|
327
341
|
def clone
|
|
328
342
|
Spree::Deprecation.warn(
|
|
329
|
-
'Spree::Address#clone is deprecated. From Spree 6.
|
|
343
|
+
'Spree::Address#clone is deprecated. From Spree 6.3 it behaves as the standard Ruby Object#clone — ' \
|
|
344
|
+
'a shallow copy keeping the owner and every other attribute. Use #snapshot for the ownerless copy a purchase keeps.'
|
|
330
345
|
)
|
|
331
346
|
|
|
332
347
|
self.class.new(value_attributes)
|
|
@@ -431,7 +446,7 @@ module Spree
|
|
|
431
446
|
require_zipcode?
|
|
432
447
|
end
|
|
433
448
|
|
|
434
|
-
# @deprecated Override {#require_postal_code?}; removed in 6.
|
|
449
|
+
# @deprecated Override {#require_postal_code?}; removed in 6.3.
|
|
435
450
|
def require_zipcode?
|
|
436
451
|
!quick_checkout && (country ? country.zipcode_required? : true)
|
|
437
452
|
end
|
|
@@ -519,7 +534,7 @@ module Spree
|
|
|
519
534
|
end
|
|
520
535
|
|
|
521
536
|
# The ISO code is what the address stores; the association is kept in step
|
|
522
|
-
# with it
|
|
537
|
+
# with it until 6.3 removes it. Assigning +country+ directly
|
|
523
538
|
# is equally supported — whichever half was set fills in the other.
|
|
524
539
|
def normalize_country
|
|
525
540
|
submitted_iso = self[:country_code].presence
|
data/app/models/spree/asset.rb
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
module Spree
|
|
4
4
|
# Deprecation alias for Spree::Media, renamed from Spree::Asset in 6.0.
|
|
5
|
-
# Retained
|
|
5
|
+
# Retained until 6.3 so existing code and extensions that reference
|
|
6
6
|
# Spree::Asset keep working; the canonical class is Spree::Media. Removed in
|
|
7
|
-
# 6.
|
|
7
|
+
# 6.3, together with Spree::Image (which this replaces).
|
|
8
8
|
#
|
|
9
9
|
# This is a true constant alias — the underlying class, table (spree_media)
|
|
10
10
|
# and prefix (media) are all Spree::Media. Only the constant differs, so
|
|
@@ -12,5 +12,5 @@ module Spree
|
|
|
12
12
|
# resolving to Spree::Media.
|
|
13
13
|
Asset = Media
|
|
14
14
|
|
|
15
|
-
Spree::Deprecation.warn('Spree::Asset is deprecated and will be removed in Spree 6.
|
|
15
|
+
Spree::Deprecation.warn('Spree::Asset is deprecated and will be removed in Spree 6.3. Use Spree::Media instead.')
|
|
16
16
|
end
|
data/app/models/spree/base.rb
CHANGED
|
@@ -306,7 +306,7 @@ class Spree::Base < ApplicationRecord
|
|
|
306
306
|
|
|
307
307
|
# @deprecated Legacy Tom Select helper for the removed Rails admin. No replacement.
|
|
308
308
|
def self.to_tom_select_json
|
|
309
|
-
Spree::Deprecation.warn('Spree::Base.to_tom_select_json is deprecated and will be removed in Spree 6.
|
|
309
|
+
Spree::Deprecation.warn('Spree::Base.to_tom_select_json is deprecated and will be removed in Spree 6.3.')
|
|
310
310
|
|
|
311
311
|
pluck(:name, :id).map do |name, id|
|
|
312
312
|
{
|
|
@@ -11,11 +11,13 @@ module Spree
|
|
|
11
11
|
# currency so upgraded stores quote unchanged.
|
|
12
12
|
preference :currency, :string, format: :currency, default: -> { Spree::Store.default.default_currency }
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
preference :maximum_item_total, :money, default: nil, nullable: true, deprecated: 'Use a Spree::DeliveryMethodRules rule on the delivery method instead; removed in Spree 6.1.'
|
|
14
|
+
RULE_DEPRECATION = 'Use a Spree::DeliveryMethodRules rule on the delivery method instead; removed in Spree 6.3.'.freeze
|
|
16
15
|
|
|
17
|
-
preference :
|
|
18
|
-
preference :
|
|
16
|
+
preference :minimum_item_total, :money, default: nil, nullable: true, deprecated: RULE_DEPRECATION
|
|
17
|
+
preference :maximum_item_total, :money, default: nil, nullable: true, deprecated: RULE_DEPRECATION
|
|
18
|
+
|
|
19
|
+
preference :minimum_weight, :decimal, default: nil, nullable: true, deprecated: RULE_DEPRECATION
|
|
20
|
+
preference :maximum_weight, :decimal, default: nil, nullable: true, deprecated: RULE_DEPRECATION
|
|
19
21
|
|
|
20
22
|
def self.description
|
|
21
23
|
I18n.t('spree.shipping_flat_rate_per_order')
|