Admin Order Status Update Notifier
Can someone suggest a notifier in admin that fires after an order status update is completed successfully. There's a notifier before the status is updated, and several during order status update email preparation, but I can't find one after the update is complete and the status update email is sent. I will need at a minimum, the order_id of the order whose status is updated. I was hoping not to modify admin/orders.php by putting in a custom notifier.
Thank you!
Re: Admin Order Status Update Notifier
157 and 158 have ZEN_UPDATE_ORDERS_HISTORY_BEFORE_INSERT in includes/functions/functions_osh_update.php. Admittedly it's right before the database update, but all the information for the update is present in the parameter. If that doesn't work, please create a PR to add ZEN_UPDATE_ORDERS_HISTORY_AFTER_INSERT once the update is done (after the insert id is captured, actually), and just copy that PRs logic to your local file; you'll get it built-in after you upgrade.
Re: Admin Order Status Update Notifier
Perfect! Thank you. Don't know how I missed it.:blush:
Re: Admin Order Status Update Notifier
One caveat, hopefully not relevant: there are (or at least were) plugins that didn't use zen_update_orders_history but rather update the table directly - not sure if this is a factor for you.
Re: Admin Order Status Update Notifier
Thanks. Not relevant in this case.
Re: Admin Order Status Update Notifier
Cool. Let us know what you build!