Support » Alpha/Beta/RC » Only email on fail of update when in alpha / beta

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    I have not tried it, but this is the filter call:

    /* @param bool   $send        Whether to send the email. Default true.
     * @param string $type        The type of email to send.
     *                            Can be one of 'success', 'fail', 'critical'.
     * @param object $core_update The update offer that was attempted.
     * @param mixed  $result      The result for the core update. Can be WP_Error.
    apply_filters( 'auto_core_update_send_email', true, $type, $core_update, $result );

    So, given that, what you really want is a function to turn off emails when type == success.

    function update_no_email_on_success($send, $type, $core_update, $result) {
      if ( $type == 'success' ) {
        $send = false;
      return $send;
    add_filter('auto_core_update_send_email', 'update_no_email_on_success', 10, 4);

    Hi Otto

    Thanks I will give it a try and see what happens…

    Hi Otto

    Your filter did block this email:

    Howdy! Your site at has been updated automatically to WordPress 3.8-alpha-26127-20131113.

    Which if I am correct is the email sent out when a point release site (eg. normal install) is updated.

    But I am still getting the

    WordPress site:
    SUCCESS: WordPress was successfully updated to WordPress 3.8-alpha-26127-20131114

    Email which I believe only is sent out when your site is in beta. Without the filter I would be getting both emails.

    You have any idea how to block both?

    Hi Otto

    Nacin told me to add the automatic_updates_send_debug_email filter as well and so I copied your process again.

    and added it to the plugin file.

    See the gist here.

    Not getting an error so let’s hope I did this correctly…

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    No, that’s not quite right there because that filter takes a different type of argument list.

    The automatic_updates_send_debug_email filter doesn’t get information on success or failure, so the most you can do is to turn on or off the debug email globally. You can turn it off like so:


    Note that the debug email only happens when you’re running a development version. If you were using just stable, it wouldn’t send you that email anyway.

    Hi Otto

    I will give that a try… I don’t mind the stable version email at all… I just wanted a way to disable the daily duplicated email updates.

    Thanks for all your help in find a solution this to small issue

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Only email on fail of update when in alpha / beta’ is closed to new replies.