#50774 closed enhancement (fixed)
include version updated FROM in plugin/theme auto-updates emails
Reported by: | pbiron | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 5.6 | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | Upgrade/Install | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
This is a followup to #50350.
In 5.5, when a plugin/theme successfully auto-updates, an email is sent to the site admin listing the plugins/themes and the versions they were updated TO.
The versions they updated FROM would be very helpful, in case admins realize that the update (although successful) causes compatibility problems (with other plugins, etc) and they need to rollback to the previous version (many admins probably won't remember what version they were running).
Unfortunately, by the time the email is generated the version updated FROM is no longer available.
5.6 should refactor the WP_Automatic_Updater
so that the version updated FROM is available when the emails are generated.
Attachments (6)
Change History (28)
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
4 years ago
This ticket was mentioned in Slack in #core-auto-updates by audrasjb. View the logs.
4 years ago
@
4 years ago
Upgrade/install: Include version updated from in plugin and theme auto-updates email notifications
#7
@
4 years ago
- Owner set to audrasjb
- Status changed from new to assigned
In 50774.1.diff
, I made the "N/A" strings translatable as it may changes from one Locale to another. I contextualized those strings just in case translations would be different in some languages.
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
4 years ago
#9
follow-up:
↓ 10
@
4 years ago
just to mention, I wanted to have this from the beginning, but it was neglegted. Can't remember who said what, but it happened on slack.
#10
in reply to:
↑ 9
@
4 years ago
I've done some initial testing of 50774.1.diff. It seems to work as expected for plugins hosted in the .org repo.
However, for externally hosted plugins, depending on how the update information is injected into the site transient, the current version may still not be available when the email notifications are sent.
For example, if a plugin hooks into pre_set_site_transient_update_plugins
or site_transient_update_plugins
to inject their info into $transient->response
then current_version
will not be set.
With that patch, the only way current_version
will be set (to other than "N/A") is if one of the low-level Requests hooks (e.g., http_response
) is used to inject the update info...and using those hooks to inject update info for externally hosted plugins is very uncommon in my experience.
I've got a couple of different ideas of how to remedy this, will investigate and upload a revised patch when I've done that.
p.s. all of the above applies to externally hosted themes as well.
#11
@
4 years ago
50774.2.diff addresses the problem mentioned in comment:10 by setting the current version in WP_Automatic_Updater::update()
, rather than trying set in the transient. It also uses "Unknown" as the string if the current version can't be determined, instead of "N/A".
I'm not 100% sold on how the version information appears in the email text, but functionally this works for plugins and themes, whether they are in the .org repo or externally hosted.
This ticket was mentioned in Slack in #core-auto-updates by pbiron. View the logs.
4 years ago
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
4 years ago
#14
@
4 years ago
I'm not sure there is much value in unknown
being the old version. It feels like it will be of little value, and in that case we might be best keeping the existing string. It keeps the message simple and direct.
This ticket was mentioned in Slack in #core-auto-updates by jeffpaul. View the logs.
4 years ago
#16
@
4 years ago
50774.3.diff addresses the latest concerns, where if we can't determine the old version number, instead of using the value Unknown
, we keep the message the same as it currently is
#17
@
4 years ago
I made a minor refresh of @dkotter latest patch in 50774.4.diff just to update the two comments for grammar. In the below two code comments just changes the to that;
Add the current version so the it can be reported in the notification email.
Add the current version so the it can be reported in the notification email.
I've uploaded a patch that adds the current plugin and/or theme version to the data that is used when handling auto updates. This current version is then used in the update/failed email for plugins and themes. Current language for this is
- plugin/theme (from CURRENT_VERSION to NEW_VERSION)
.Happy to update that message if there's something else that makes more sense.