How To Disable WordPress Update Notifications (Code or Plugin)

Tag: |   Category:

Update Notifications can be disable in two ways

1. Use a plugin.

You can install any of these two

2. Use custom code snippets

Disable Update Notifications

// Disable core update emails
add_filter( 'auto_core_update_send_email', '__return_false' );

// Disable plugin update emails
add_filter( 'auto_plugin_update_send_email', '__return_false' );

// Disable theme update emails
add_filter( 'auto_theme_update_send_email', '__return_false' );

Disabled Update Notifications In Dashboard

To hide Dashboard notification for ALL USERS like the above, use below snippet

// Hide dashboard update notifications for all users
function kinsta_hide_update_nag() {
remove_action( 'admin_notices', 'update_nag', 3 );
}

add_action('admin_menu','kinsta_hide_update_nag');

Another option would be to leave update notifications for Administrator users but hide them for all other user roles. To accomplish this, you can modify the code like this:

// Hide dashboard update notifications for non-admin users
function kinsta_hide_update_nag() {
if ( ! current_user_can( 'update_core' ) ) {
remove_action( 'admin_notices', 'update_nag', 3 );
}
}

add_action('admin_menu','kinsta_hide_update_nag');

For full article - https://kinsta.com/knowledgebase/disable-wordpress-update-notification/

Copyright © 2024 Siam Naulak.
magnifiercrossmenu