Include version info in email notifications
Currently, just the plugin/theme names (and whether the update succeeded/failed) is included in the email notification,
Including the version updated FROM would help admins manually rollback if they later discover the update causes problems on the site (it's pretty likely they won't remember what version they were running before the update).
The use case for including the version updated TO is less clear.
And including version info at all is kind of related to #81, so I'm not sure it's necessary but wanted to get other opinions.
What about something like this:
The following plugins were successfully updated:
- My Plugin (version 0.1.0 to latest)
that works for me.
I'll have to look in more detail later, but it appears that at the time the notification email is sent, we no longer know what the FROM version was :-(
Maybe this is a case of "nice to have", but would be much easier if core gave us the old_version in the $item param that is passed to automatic_updates_complete (which is the action the notification is hooked to). And hence, maybe we handle this after the merge?
It's a good idee!
Yeah, with EUM, we had to keep a running transient of plugins/themes and compare it to those during the auto-update process. It's not a great approach, but the one that worked best for us.
I'm not really sure where I saw this bit of code/algorithm, but it was in the last couple of days.
The gist of it was to use get_plugin_data() on upgrader_pre_install hook and then get the new version on upgrader_post_install.
I tested this on prod and here's what I received.
The following plugins were successfully updated:
- CoBlocks
- Ultimate Addons for Beaver Builder
If you experience any issues or need support, the volunteers in the WordPress.org support forums may be able to help.
https://wordpress.org/support/forums/
The WordPress Team
It's good on two fronts. One, it updated a .org asset. Two, it updated a third-party asset.
No themes were updated, so would be nice if the subject were more contextual.
It would be nice to have the version information, but for the average user, perhaps it's not as useful?