Skip to content

Commit

Permalink
App configuration: Use SimpleOrderContents by default
Browse files Browse the repository at this point in the history
With the null promotion configuration in place, we can't use the legacy
Spree::OrderContents class, as that makes references to the legacy
promotion system.

See #5755
  • Loading branch information
mamhoff committed Jun 5, 2024
1 parent ca82fa6 commit bbfc9a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/lib/spree/app_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def default_pricing_options
# @!attribute [rw] order_contents_class
# @return [Class] a class with the same public interfaces as
# Spree::OrderContents.
class_name_attribute :order_contents_class, default: 'Spree::OrderContents'
class_name_attribute :order_contents_class, default: 'Spree::SimpleOrderContents'

# Allows providing your own class for shipping an order.
#
Expand Down
4 changes: 4 additions & 0 deletions core/spec/lib/spree/app_configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
expect(prefs.variant_search_class).to eq Spree::Core::Search::Variant
end

it "uses simple order contents class by default" do
expect(prefs.order_contents_class).to eq Spree::SimpleOrderContents
end

it "uses variant price selector class by default" do
expect(prefs.variant_price_selector_class).to eq Spree::Variant::PriceSelector
end
Expand Down

0 comments on commit bbfc9a5

Please sign in to comment.