Skip to content

v1.2.0

Latest

Choose a tag to compare

@dimidev dimidev released this 25 Oct 12:05

What's changed

Store pickup shipping now allows all payment methods

The gem now handles payment method availability itself, so host apps no longer need to copy a decorator from the README.

  • The Store Pickup payment method is shown only when the selected shipping method is store pickup.
  • When store pickup shipping is selected, all other available payment methods are shown alongside it.

New preference: exclusive_payment_method

To get the previous behavior back (store pickup shipping shows only the Store Pickup payment method), add this to an initializer:

SpreeStorePickup::Config[:exclusive_payment_method] = true

Defaults to false.

⚠️ Upgrade notes

  • Decorator renamed: the gem's decorator is now Spree::PaymentMethodStorePickupDecorator. Previously it was Spree::PaymentMethodDecorator.
  • Rename your app's decorator if it overrides available_for_order?. If your app's decorator uses the name Spree::PaymentMethodDecorator, give it a different name, e.g.
    Spree::PaymentMethodCodDecorator. Then remove the store pickup rules from it, since the gem now handles them. Call super to build on the gem's rules, or skip it to replace them.
  • No migrations. The helpers store_pickup? and store_pickup_available?(order) are unchanged.

Full changelog: v1.1.6...v1.2.0