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

Stop decorating order#finalize! to create subscriptions #260

Closed
FrancescoAiello01 opened this issue Aug 2, 2022 · 0 comments · Fixed by #261
Closed

Stop decorating order#finalize! to create subscriptions #260

FrancescoAiello01 opened this issue Aug 2, 2022 · 0 comments · Fixed by #261

Comments

@FrancescoAiello01
Copy link
Collaborator

If there are issues with order finalization, leaving the order incomplete (as described here), a subscription can still be created depending on when the failure happened. Additionally, it's worth noting that calling the order#finalize! method is discouraged and deprecated as of solidusio/solidus#4482.

While we shouldn't expect issues with finalize!, it would be safer to avoid decorating this critical Solidus flow by moving the subscription creation to a background job triggered by an order finalization subscriber.

Decorator that generates subscriptions: https://github.com/solidusio-contrib/solidus_subscriptions/blob/master/app/decorators/models/solidus_subscriptions/spree/order/finalize_creates_subscriptions.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant