[wp-trac] [WordPress Trac] #50448: Add tolerance to plugin and theme auto-update failure emails
WordPress Trac
noreply at wordpress.org
Wed Jun 24 20:06:22 UTC 2020
#50448: Add tolerance to plugin and theme auto-update failure emails
----------------------------+---------------------
Reporter: desrosj | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.5
Component: Administration | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
----------------------------+---------------------
Comment (by desrosj):
Summarizing a conversation that I had with @arpitgshah here for future
reference.
As the feature stands now, email notifications are not tracked. One way to
approach this would be:
When an update fails, check the plugin is listed in the failure list (as
stored in an option). If not, it should be added to an array with a
timestamp of the failure as key value pair. Something like
`$failure_emails[ 'akismet/akismet.php' ] = current_time( 'timestamp' );`
for example.
If that plugin is present in the array and it has not been 3 days since
the timestamp, an email can be sent and the timestamp should be updated.
The duration between emails should be filterable, but 3 days by default
seems fine.
When a plugin is updated successfully, it should be removed from the
failure list if present. Any failure after a successful update is a new
occurrence and does not need to be throttled.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50448#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list