QuestionQ13
Developing with AdminAn Adobe Commerce developer has installed a module supplied by a third-party vendor. The module dispatches a custom event named third_party_event_after and defines an observer named third_party_event_after_observer that listens for that event. The developer wants to listen for this custom event from their own module, but needs their observer’s logic to run after the third_party_event_after_observer observer has completed.
What should the developer do to ensure that their observer runs after the observer defined by the third-party module?
- A Ensure the third-party module is listed in the <sequence> node of the developer's module.xml file.
- B Set the sortOrder of the new observer to be less than that of the third-party vendor's observer.
- C This is not possible as observers listening to the same event may be invoked in any order.
Community Discussion