To enable automatic plugin updates you need to use this filter
add_filter( 'auto_update_plugin', '__return_true' );
Add this filter via a plugin.
The filter callback is passed with objects holding information about the plugin that will be auto updated. Therefore you can also enable or disable auto update for specific plugins. For example:
function auto_update_specific_plugins ( $update, $item ) {
if ( $item->slug == 'akismet' ) ) {
return true; // Always update "akismet" plugin
} else {
return $update; // Else, use the normal API response to decide whether to update or not
}
}
add_filter( 'auto_update_plugin', 'auto_update_specific_plugins', 10, 2 );
if ( $item->slug == 'akismet' ) ) {
return true; // Always update "akismet" plugin
} else {
return $update; // Else, use the normal API response to decide whether to update or not
}
}
add_filter( 'auto_update_plugin', 'auto_update_specific_plugins', 10, 2 );