WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 3 months ago

Last modified 7 weeks ago

#50988 closed enhancement (fixed)

Provide option to disable emails about auto-updates

Reported by: Paddy Landau Owned by: desrosj
Milestone: 5.5.1 Priority: normal
Severity: normal Version: 5.5
Component: Upgrade/Install Keywords: has-patch
Focuses: administration Cc:

Description

WordPress 5.5 has introduced long-awaited and welcome auto-updates for themes and plugins.

However, as I run several sites with different themes and plugins, I am getting frequent (and unnecessary) emails about auto-updates.

These emails need to be optional, not mandatory. By all means, turn on email notifications by default, but please provide the admin with an option to disable the auto-update notifications.

Thank you

Attachments (1)

50988.diff (1.8 KB) - added by audrasjb 3 months ago.
Upgrade/Install: Pass the result of plugins or themes update tasks to auto_plugin_update_send_email and auto_theme_update_send_email filters.

Download all attachments as: .zip

Change History (46)

#1 @pbiron
3 months ago

Welcome to trac!!

While there is no "setting" in the Dashboard for controlling whether email notifications are sent when plugin and theme auto-updates are attempted, there are the auto_plugin_update_send_email and auto_theme_update_send_email that can be used for that.

For more details, see Controlling Plugin and Theme auto-update email notifications and Site Health infos in WP 5.5.

#2 follow-up: @Paddy Landau
3 months ago

Thank you for the link, @pbiron. Unfortunately, for a non-coder, this reads somewhat like gobbledygook.

If I understand correctly, I need to add the following code to WordPress.

add_filter( 'auto_plugin_theme_update_email', 'myplugin_auto_plugin_theme_update_email', 10, 4 );
  • Do the numbers 10 and 4 mean something specific, or do I just use them as is?
  • Where do I put the code?
  • When WordPress is next updated, will that code be overwritten?

The answers to these questions are entirely absent.

Last edited 3 months ago by Paddy Landau (previous) (diff)

#3 in reply to: ↑ 2 ; follow-up: @knutsp
3 months ago

Replying to Paddy Landau:

Thank you for the link, @pbiron. Unfortunately, for a non-coder, this reads somewhat like gobbledygook.

This describes how a plugin author can alter the way WordPress works as default. Please don't try yourself, as non-coder. There are plugins that control sending of all WP emails. If these new types are not taken care of yet, they will probably soon be, or ask for it.

New user facing options are usually not for core.

#4 in reply to: ↑ 3 @greyham
3 months ago

Replying to knutsp:

New user facing options are usually not for core.

I’m with Paddy on this; these new emails introduced in 5.5 are as annoying as spam. Given they are a core feature, there should be a core setting to disable them.

#5 @philraymond
3 months ago

Agreed. I have 45 sites. I'm getting dozens of emails a day.

#6 @johnbillion
3 months ago

  • Keywords 2nd-opinion added
  • Milestone changed from Awaiting Review to 5.5.1

Let's move this to 5.5.1 for discussion. We don't want to discourage users from using the auto-updates feature for plugins and themes just because the emails are annoying.

#7 follow-up: @Paddy Landau
3 months ago

Having read more about this, I think that we need to have the following three options.

  1. All emails on
  2. All emails off, except when there is an error
  3. All emails off

I would suggest that option 2 should be the default, with option 3 marked as "Not recommended".

#8 follow-up: @knutsp
3 months ago

I can see that for many, the frequency of core admin emails may increase when auto-updates are enabled. WordPress also send admin emails abut user password changes, new user registrations and so on.

Should we make an exception for auto-updates, make them an option, not just on/off, but more even fine grained, as suggested above? There will be demands for distinquishing theme/plugin updates, individual ones of those, almost endless. This is one of the reasons for "decisions - not options" principle. But such principle can and must be overridden when it may useful for a majority of users. And especially if the lack of option(s) may have side effects, like not wanting to enable auto-updates just to get fewer emails.

If this is implemented soon, let it at least be temporary.

WP Notify should take care of all kinds of messages and logging and/or forwarding them to any desired service (Web Push Notifications, WhatsApp, SMS, etc. - by plugin). WP Notify should be end user configurable to some extent, like muting some messages by source/severity.

But please don't introduce something that may delay WP Notify. We need to prepare for an almost email-less future (for some), not just ad-hoc fixing an annoyance.

#9 in reply to: ↑ 8 @Paddy Landau
3 months ago

Replying to knutsp:

… There will be demands for distinguishing theme/plugin updates, individual ones of those, almost endless.

There is no need to go to that level of complexity.

Normally, we want simpler because it's more efficient in terms of both maintenance and execution. However, the new auto-update system is overwhelming in its frequency of emails, which is why a little extra complexity would be appreciated. Just a little, though — adding all of those options that you are (rightly) worried about would increase complexity not only for maintenance but also for administration.

That is why I suggested only the three options on, off, and off except for errors. Anything else becomes too complex.

If you are concerned about non-technical users missing problems, you could even restrict it to just two options: on and off except for errors.

If it's simpler for the WordPress programmers, you could even restrict the options to only plugins, because plugin updates are by far the most common.

If this is implemented soon, let it at least be temporary.

I don't understand why you'd want to add the feature and then take it away again?

We need to prepare for an almost email-less future…

That's an excellent point. Imagine receiving notifications on your phone repeatedly day and night for non-errors!

#10 @spiros
3 months ago

I absolutely agree that these emails should be optional.

#11 @desrosj
3 months ago

I too have seen a fairly significant volume of auto-update emails because I have a large handful of sites. I enjoy the oversight for a single site that these provide, but when you have multiple sites (which usually means a common set of plugins), it can be overwhelming. I'm not sold that an on/off switch is best, though.

Thinking through a few adjustments that could be explored (these are back of napkin ideas not hard suggestions):

  • Only send emails for failures. This is tricky because even updates that are successfully applied could be "breaking" for certain sites with combinations of plugins/themes.
  • Send a "digest" email for successful emails weekly instead of when the update is applied. This will prevent multiple emails for the same plugin updating multiple times in a short span of time (maybe for bug fixes) but still inform site owners of all update events that took place for a site.
  • Expand the auto-update related Site Health section to include a list of plugins and theme auto-update events.
  • A page under Tools that lists the most recent auto-update events for plugins and themes.

@audrasjb
3 months ago

Upgrade/Install: Pass the result of plugins or themes update tasks to auto_plugin_update_send_email and auto_theme_update_send_email filters.

#12 @memphi
3 months ago

I got responsible for a higher number of WP-websites and since most web-admins don't take care for updates, I was forced to enable auto-updates to reach at least a basic security level.

However, since a few weeks I get spamed by numbers of mails that this plugin or that theme was updated automatically. But this is what I expect, no need to inform that something was done correctly as plnned. Just inform in case of warnings/errors.
Actually it's like a fire alarm that notifieds permantenly that there is no fire, but it should be vice versa. ;)

#13 @audrasjb
3 months ago

  • Keywords has-patch dev-feedback added; 2nd-opinion removed

Hello,
As per todays core-autoupdates team’s meeting, let's start with adding some context to auto_plugin_update_send_email and auto_theme_update_send_email filters.

In 50988.diff, pass the result of plugins or themes updates tasks via the $update_results parameter. It also updates the related DocBlocks accordingly.

#14 follow-up: @telesites
3 months ago

Agreed. We have 90+ sites. We need to be able to turn these off somehow, please.

In fact, they should be off by default, I think. If we have to log into each site to throw a switch to turn these off - it will require about 3 hours if the person does it non-stop.
We use a third party plugin to update ALL plugins and it has an option to enable email notifications. It is nice that you decided to include this in the core but we need some control.

For now we have created a rule in our email program to deal with them.

#15 follow-up: @ronalfy
3 months ago

I agree it would be nice to have some type of control over email, especially regarding failures. Currently, in core (please correct me if I'm wrong), there's no hook to indicate an update failure. Would be nice to have one and then core or a third-party UI can choose to let those emails through or not.

#16 @christiesoda
3 months ago

Thank you Paddy for posting this ticket. I would really like to see this happen.

I am receiving NUMEROUS EMAILS from just a SINGLE SITE and I have developed quite a number a WordPress websites, for clients.

I am receiving an overload of these emails.

Some of these sites, I DON'T HAVE ACCESS TO anymore, so disabling this feature would not be possible. I also CAN'T install a new plugin to disable these emails.

I would really like to see WordPress make this an optional FEATURE TO ENABLE.

Thank you.

#17 in reply to: ↑ 14 @audrasjb
3 months ago

Replying to telesites:

Agreed. We have 90+ sites. We need to be able to turn these off somehow, please.

In fact, they should be off by default, I think. If we have to log into each site to throw a switch to turn these off - it will require about 3 hours if the person does it non-stop.
We use a third party plugin to update ALL plugins and it has an option to enable email notifications. It is nice that you decided to include this in the core but we need some control.

For now we have created a rule in our email program to deal with them.

@telesites if you maintain a large amount of website, you should programatically disable email notifications using the available and documented filters:

<?php
add_filter( 'auto_plugin_update_send_email', '__return_false' );
add_filter( 'auto_theme_update_send_email', '__return_false' );

Companies that maintain many websites usually put such hooks in a mu-plugin so it can be uploaded and maintained programatically, without having to connect to each website’s dashboard.


@christiesoda this is actually an optional feature you can disable as auto-updates need to be manually activated plugin by plugin and theme by theme.

Some of these sites, I DON'T HAVE ACCESS TO anymore, so disabling this feature would not be possible. I also CAN'T install a new plugin to disable these emails.

In this case, you weren't able to activate auto-updates so you don't receive any notification. Someone probably activated it for you, which means you are still the admin of a website you don't maintain anymore. You should contact the website owner to ask them to remove your admin account, isn't it? I don't think WordPress core can handle such use case.

Last edited 3 months ago by audrasjb (previous) (diff)

#18 in reply to: ↑ 15 ; follow-up: @audrasjb
3 months ago

Replying to ronalfy:

I agree it would be nice to have some type of control over email, especially regarding failures. Currently, in core (please correct me if I'm wrong), there's no hook to indicate an update failure. Would be nice to have one and then core or a third-party UI can choose to let those emails through or not.

@ronalfy yes, this is what I added in 50988.diff :)

#19 in reply to: ↑ 18 @ronalfy
3 months ago

Replying to audrasjb:

Replying to ronalfy:

I agree it would be nice to have some type of control over email, especially regarding failures. Currently, in core (please correct me if I'm wrong), there's no hook to indicate an update failure. Would be nice to have one and then core or a third-party UI can choose to let those emails through or not.

@ronalfy yes, this is what I added in 50988.diff :)

Thank you. Sorry I missed that. May I ask what's in the context payload?

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


3 months ago

#21 @audrasjb
3 months ago

  • Keywords needs-refresh added
  • Owner set to audrasjb
  • Status changed from new to accepted

As per today's bug scrub, we agreed the filter update is a must have for 5.5.1.
The existing patch looks good, we only need to document what's in $update_results['plugin'] and $update_results['theme'].

Next steps will be discussed during tomorrow’s #core-auto-updates team meeting.

#22 in reply to: ↑ 7 ; follow-up: @davzarek
3 months ago

Replying to Paddy Landau:

Having read more about this, I think that we need to have the following three options.

  1. All emails on
  2. All emails off, except when there is an error
  3. All emails off

I would suggest that option 2 should be the default, with option 3 marked as "Not recommended".

This ticket was mentioned in Slack in #core-auto-updates by audrasjb. View the logs.


3 months ago

#24 in reply to: ↑ 22 @memphi
3 months ago

Replying to davzarek:

Replying to Paddy Landau:

Having read more about this, I think that we need to have the following three options.

  1. All emails on
  2. All emails off, except when there is an error
  3. All emails off

I would suggest that option 2 should be the default, with option 3 marked as "Not recommended".

I fully agree! :)

Last edited 3 months ago by memphi (previous) (diff)

#25 @straighttalkts
3 months ago

Agreed basic feature . should be an easy fix. Too much white noise means important emails are missed

#26 @audrasjb
3 months ago

Hi there,

As per today's #core-auto-updates team meeting, the current approach for WP 5.5.1 (next minor) is to provide more detailed hooks so plugin authors and WordPress developers can more easily extend the feature and add filters to failed/success updates email.

Other options will be considered for next major release.

This ticket was mentioned in Slack in #core by desrosj. View the logs.


3 months ago

#28 @desrosj
3 months ago

  • Owner changed from audrasjb to desrosj
  • Status changed from accepted to assigned

#29 @desrosj
3 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 48888:

Upgrade/Install: Pass details about the specific plugin and theme updates attempted to filters.

This adds an additional parameter to the auto_plugin_update_send_email and auto_theme_update_send_email filters to provide the additional context of which updates were attempted and their outcome. This will help plugin and theme auto-update emails to be better tailored to a site owner’s liking.

Props audrasjb, Paddy Landau, desrosj.
Fixes #50988.

#30 @desrosj
3 months ago

  • Keywords dev-feedback needs-refresh removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening to backport.

#31 @desrosj
3 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 48889:

Upgrade/Install: Pass details about the specific plugin and theme updates attempted to filters.

This adds an additional parameter to the auto_plugin_update_send_email and auto_theme_update_send_email filters to provide the additional context of which updates were attempted and their outcome. This will help plugin and theme auto-update emails to be better tailored to a site owner's liking.

Props audrasjb, Paddy Landau, desrosj.
Merges [48888] to the 5.5 branch.
Fixes #50988.

#32 @SergeyBiryukov
3 months ago

In 48903:

Docs: Correct formatting of the auto_theme_update_send_email filter DocBlock.

Synchronize description of the $enabled parameter with the auto_plugin_update_send_email filter.

Follow-up to [48889].

See #50768, #50988.

#33 @Paddy Landau
3 months ago

Thank you for the changes and the speed with which you've attended to this!

Does this change mean that we still need to use a plugin to disable the messages?

Shaun Simmons has created a most useful plugin, Disable Plugin Autoupdate Emails, to disable the messages. However, this is a blanket disabling, and doesn't allow emails with errors through.

I truly feel that the core should include this option, and, having read previous comments, that it should by default send messages only after failure. Having yet another plugin (a typical installation is already packed with plugins) seems overkill for such a basic function.

Thank you

(Edit: Purely for the record, this issue was discussed in the WordPress forums.)

Last edited 3 months ago by Paddy Landau (previous) (diff)

#34 @fanvid
3 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

I agree, it should have some checkboxes to control these automated e-mails, I have 10 sites and its already spamming hard my inbox, and just having hooks or a plugin to fix this means adding even more complexity and more reasons for things to break, already half of the plugins i use are just to make wordpress work like it should (like plugin for the classic editor or plugin for showing media correctly on a truncated RSS).

I dont even know where are they going with this feature, even a user with 1 wp site, if he gets a e-mail every 3 days saying x or x was updated, how long will it go before it starts going to spam or the user starts ignoring the e-mails altogether... and i bet wodpress.com has in its panel some control for all automated e-mails.

#35 follow-ups: @knutsp
3 months ago

This change will enable plugins to see the difference and offer whatever on that basis.

Checkboxes in core means more user options, which is bad and not WordPress core philosophy.
What would be natural in 5.6 or even earlier is, by default, only to send emails on update failures.

#36 in reply to: ↑ 35 @spiros
3 months ago

Totally agree with that.

Replying to knutsp:

What would be natural in 5.6 or even earlier is, by default, only to send emails on update failures.

#37 in reply to: ↑ 35 @fanvid
3 months ago

Replying to knutsp:

This change will enable plugins to see the difference and offer whatever on that basis.

Checkboxes in core means more user options, which is bad and not WordPress core philosophy.
What would be natural in 5.6 or even earlier is, by default, only to send emails on update failures.

Im not entirely sure what is wordpress core functionality nowadays, if they want the core simple with as few options as possible, that's great, make it efficient and streamlined and bundle these additional "features" as official plugins, that is fine, but adding features like this? They basically created a self spamming system and the "current" solution is for me to edit my functions.php or install another plugin? Where is this an improvement of core functionality?

I kid you not i had to put a gmail filter so my mail from wp wouldnt be flagged (because 2 were dropped) and yes, absolutely, if by default, it only sends e-mails on failure is a way better solution another would be to disabled by default all e-mails and people that want them can edit their functions.php or install a plugin...

#38 @SergeyBiryukov
3 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Just noting this ticket was closed on a completed milestone. If you'd like to start a discussion to reconsider any changes here, or suggest any further changes, please create a new ticket. Thanks!

#39 @alienative
3 months ago

I dont understand why we can not just turn off the automatic updates email notifications, which is so annoying. I have nearly 100 website active and my inboxes gets spammed with these notifications every day 🙁

Also I believe the automatic updates should be manually turned on. Im in trouble for some plugin automatic updates as they were hard coded.

Version 0, edited 3 months ago by alienative (next)

#40 @audrasjb
3 months ago

@alienative auto-updates are already manually turned on. It's an opt-in feature

#41 @johnbillion
3 months ago

There are a few plugins in the WordPress plugin directory which automatically opted themselves into automatic updates. I believe the authors of these plugins were contacted.

@alienative if you come across any plugins which hard code automatic updates, please email plugins@wordpress.org with the details. Thanks!

#43 @Doobeedoo
2 months ago

Hello,
Those emails are very annoying
Many plugins do not have the option to enable/disable the auto update
Why was this ticket close ?

#44 @telesites
2 months ago

Hello Doobeedoo,
This ticket was closed because it has been discussed and FIXED.
You can see the status in the top line next to the ticket number:

#50988 closed enhancement (fixed)

You should see the results in a future update.

Hope this helps.

Last edited 2 months ago by telesites (previous) (diff)

#45 in reply to: ↑ description @Azam.info
7 weeks ago

Replying to Paddy Landau:

WordPress 5.5 has introduced long-awaited and welcome auto-updates for themes and plugins.

However, as I run several sites with different themes and plugins, I am getting frequent (and unnecessary) emails about auto-updates.

These emails need to be optional, not mandatory. By all means, turn on email notifications by default, but please provide the admin with an option to disable the auto-update notifications.

Thank you

Note: See TracTickets for help on using tickets.