Don't Update Some WordPress Plugins
<?php
/*
Plugin Name: Don't Update Some Plugins
Plugin URI: https://wpbeaches.com
Description: This doesn't update some plugins
Author: Neil Gowran
Author URI: https://wpbeaches.com
License: GPL2
*/
add_filter( 'auto_update_plugin', 'do_not_auto_update_specific_plugins', 10, 2 );
// Don't update some plugins
function do_not_auto_update_specific_plugins ( $update, $item ) {
// Array of plugin slugs to never auto-update
$plugins = array (
'akismet',
'duplicator',
);
if ( in_array( $item->slug, $plugins ) ) {
return false; // Never update plugins in this array
} else {
return true; // Else update the rest
}
}