wp-autoupdates icon indicating copy to clipboard operation
wp-autoupdates copied to clipboard

Include version info in email notifications

Open pbiron opened this issue 5 years ago • 6 comments

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.

pbiron avatar Apr 21 '20 20:04 pbiron

What about something like this:

The following plugins were successfully updated:

  • My Plugin (version 0.1.0 to latest)

audrasjb avatar Apr 21 '20 20:04 audrasjb

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?

pbiron avatar Apr 21 '20 22:04 pbiron

It's a good idee!

rodolphebertozzo avatar Apr 22 '20 16:04 rodolphebertozzo

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.

ronalfy avatar Apr 22 '20 16:04 ronalfy

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.

abuyoyo avatar Apr 24 '20 10:04 abuyoyo

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?

ronalfy avatar Apr 24 '20 13:04 ronalfy