Skip to content

Instantly share code, notes, and snippets.

@knolaust
Last active January 30, 2024 14:50
Show Gist options
  • Save knolaust/1b24e7fcfc9adafa075a79465164c386 to your computer and use it in GitHub Desktop.
Save knolaust/1b24e7fcfc9adafa075a79465164c386 to your computer and use it in GitHub Desktop.
Disable Automatic Updates Email in WordPress #wordpress, #updates, #email, #notifications
<?php
/**
* Disables automatic update notification emails in WordPress.
*
* This code snippet hooks into WordPress auto-update settings to disable
* automatic emails for core, plugin, and theme updates. It's particularly
* useful for reducing email clutter and is often suitable for a managed
* WordPress environment where updates are handled through a central management system.
*
* Gist Keywords: wordpress, emails, admin, notifications
*
* @author Knol Aust
*/
// Disable auto-update emails for WordPress core.
add_filter( 'auto_core_update_send_email', '__return_false' );
// Disable auto-update emails for plugins.
add_filter( 'auto_plugin_update_send_email', '__return_false' );
// Disable auto-update emails for themes.
add_filter( 'auto_theme_update_send_email', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment