You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, my new subscriber will only run when the order_finalized event is fired. I think this has to do with the event_actions hash in the Spree::Subscriber module. Its keys are method names, so in the above example the key would be :my_method, and the second invocation of event_action will overwrite the previously existing contents of Spree::Subscriber.event_actions[:my_method]. See here and here.
Solidus Version:
Reproducible on 2.11 and master branch.
To Reproduce
See above.
Current behavior
MySubscriber#my_method is only called upon firing order_finalized, because that is the last invocation of event_action.
Expected behavior
MySubscriber#my_method is called upon firing order_recalculated and order_finalized.
The text was updated successfully, but these errors were encountered:
I'll propose replacing the current event system with Omnes (which is an extraction of the former, with better subscriber objects) very soon. That is fixed there.
I have an event subscriber that I would like to subscribe to two events:
order_finalized
andorder_recalculated
.Based on the documentation, I set out to create a subscriber like so:
However, my new subscriber will only run when the
order_finalized
event is fired. I think this has to do with theevent_actions
hash in theSpree::Subscriber
module. Its keys are method names, so in the above example the key would be:my_method
, and the second invocation ofevent_action
will overwrite the previously existing contents ofSpree::Subscriber.event_actions[:my_method]
. See here and here.Solidus Version:
Reproducible on 2.11 and master branch.
To Reproduce
See above.
Current behavior
MySubscriber#my_method
is only called upon firingorder_finalized
, because that is the last invocation ofevent_action
.Expected behavior
MySubscriber#my_method
is called upon firingorder_recalculated
andorder_finalized
.The text was updated successfully, but these errors were encountered: