[wp-trac] [WordPress Trac] #50448: Add tolerance to plugin and theme auto-update failure emails

WordPress Trac noreply at wordpress.org
Mon Jul 6 17:04:12 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:  has-patch needs-testing  |     Focuses:
-------------------------------------+---------------------

Comment (by earnjam):

 Haven't tested it yet, but on a read through it looks good.

 Only thing I noticed is in `send_plugin_theme_email()`, the
 `$unique_failures` variable gets set to `false` immediately before the
 conditional, so you don't need to set it again.
 {{{#!php
 <?php
                 $unique_failures = false;
                 $failure_emails  = get_option(
 'auto_plugin_theme_update_emails', array() );

                 // When only failures have occurred, an email should only
 be sent if there are either new failures,
                 // or failures that have not sent out an email recently.
                 if ( 'fail' === $type ) {
                         $unique_failures = false;
 }}}

 Do we want to add some unit tests for this too?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50448#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list