By using our mini forum, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy

Q: Disable plugin update notifications as a function in WordPress

+4 votes

Hi, I am building WordPress website for a client and I've made some modifications to the CSS files of one of the plugins (for GDPR);

I do not want the client to update the plugin in the near future and ruin my CSS modifications within the next update!

How can I disable the update notifications in WordPress for this particular plugin?

The best option is if you can share some code to be implemented in functions.php - so it is hidden :-) Not a plugin...

It is a WP plugin for General Data Protection Regulation (GDPR) Compliance.


asked in Web Development category by user ak47seo
edited by user golearnweb

3 Answers

0 votes
Best answer

BTW, Insert the following code to the functions.php (better in your Child WP theme) file of your active theme. It will remove the WordPress update nag -> WordPress update is available!

/*Remove WP update notification*/
function remove_core_updates() {
	if (!current_user_can('update_core')) {
	add_action('init', create_function('$a', "remove_action( 'init', 'wp_version_check' );"), 2);
	add_filter('pre_option_update_core', '__return_null');
	add_filter('pre_site_transient_update_core', '__return_null');

add_action('after_setup_theme', 'remove_core_updates');

This code below disables all the updates notifications regarding plugins, themes & WordPress completely:

/* Remove ALL WP update notifications */
function remove_core_updates() {
	global $wp_version;
	return (object) array('last_checked' => time(), 'version_checked' => $wp_version,);

add_filter('pre_site_transient_update_core', 'remove_core_updates');
add_filter('pre_site_transient_update_plugins', 'remove_core_updates');
add_filter('pre_site_transient_update_themes', 'remove_core_updates');
answered by user golearnweb
selected by user golearnweb
+3 votes

Firstly you need to use Child Theme for your WordPress theme (not required, BUT RECOMMENDED)

Secondly into the functions.php (of your child theme) add these lines of code:

 * Prevent update notification for plugin: cookie-law-info
function disable_plugin_updates($value) {
    if (isset($value) && is_object($value)) {
        if (isset($value->response['cookie-law-info/cookie-law-info.php'])) {
    return $value;

add_filter('site_transient_update_plugins', 'disable_plugin_updates');

Bear in mind that you need to add add_filter WordPress CMS function to your code (on line #13 highlighted).

answered by user andrew
+2 votes

You can also use this plugin Easy Updates Manager to disable:

  • Plugins
  • Themes
  • WordPress's core updates

...and then eventually hide it with the following code:

/* Hide WP plugin Easy Updates Manager in the WordPress dashboard area */
function hidePlugin() {
    echo '<style>
    .plugins-php .plugins tr[data-slug="easy-updates-manager"]{ display:none; }
answered by user golearnweb