Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legacy Promotions: Fix shipping promo application after state machine reload #5797

Merged

Commits on Jun 19, 2024

  1. Add failing spec: Apply shipping promos after state machine reload

    Notice I had to give the implementation method an argument, because
    RSpec stubs do not have the correct `arity`; and `state_machines` will
    send the event, resulting in an ArgumentError otherwise.
    mamhoff committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    824ba09 View commit details
    Browse the repository at this point in the history
  2. Patch Order State Machine rather than order

    Some extensions rely on the default state machine being fully
    reloadable, and as long as we use solidus_legacy_promotions, the
    before_transition method `:apply_shipping_promotions` must survive a
    reload of the state machine.
    
    Rather than patching Spree::Order and adding the transition here, we add
    it where all the other default transitions are added: In the class
    methods of the order state machine.
    mamhoff committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    dbcf66d View commit details
    Browse the repository at this point in the history