Skip to content

Refactor some code to remove warnings #46

@softr8

Description

@softr8

price_in

Spree::Price#price_in will be removed from Solidus 3.0, and variant_decorator uses it throwing the following warning:

DEPRECATION WARNING: price_in is deprecated and will be removed from Solidus 3.0 (use price_for instead) (called from active_sale_in at /.../solidus_sale_prices/app/decorators/models/solidus_sale_prices/spree/variant_decorator.rb:26)

Price_on requires pricing options, not sure how to get the params required, maybe:

def active_sale_in(currency)
  price_for(Spree::Config.pricing_options_class.new(currency: currency))
end

discard

Spree::Price.with_deleted has been deprecated. Use Spree::Price.with_discarded instead. app/models/spree/sale_price.rb:6

Metadata

Metadata

Assignees

No one assigned

    Labels

    pinnedShould not be marked as stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions