- Issue created by @j0sbeir
- ๐ฎ๐ฑIsrael jsacksick
What's the rationale for setting the priority to "-900"?
- ๐บ๐ฆUkraine marchuk.vitaliy Rivne, UA
vmarchuk โ made their first commit to this issueโs fork.
- Merge request !12Issue #3354029: Add support for event dispatcher priority. โ (Merged) created by Unnamed author
- ๐บ๐ฆUkraine marchuk.vitaliy Rivne, UA
@rszrama
This is something that can work https://git.drupalcode.org/project/commerce_email/-/merge_requests/12/diffs.
In this case, if the plugin is defined using a custom module, the priority parameter can be set directly from the plugin annotations (or, if not set, it will default to 0).
For plugins defined in the commerce_email module, the priority can be changed using hook_commerce_email_event_info_alter:/** * Implements hook_commerce_email_event_info_alter(). */ function hook_commerce_email_event_info_alter(&$definitions) { foreach ($definitions as &$definition) { if ($definition['id'] == 'order_paid') { $definition['priority'] = -900; } } }
(we probably need to document this information in the README)
-
vmarchuk โ
committed 9e1b5675 on 8.x-1.x
Issue #3354029: Add support for event dispatcher priority.
-
vmarchuk โ
committed 9e1b5675 on 8.x-1.x
- Status changed to Fixed
11 months ago 2:20pm 6 February 2024 Automatically closed - issue fixed for 2 weeks with no activity.