Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress - Disable specific plugin update check
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {
if ( isset($value) && is_object($value) ) {
if ( isset( $value->response['plugin-folder/plugin.php'] ) ) {
unset( $value->response['plugin-folder/plugin.php'] );
}
}
return $value;
}
add_filter( 'site_transient_update_plugins', 'disable_plugin_updates' );
@toddcavanaugh

This comment has been minimized.

Copy link

toddcavanaugh commented Jun 27, 2018

Thank for sharing! Worked well. If I wanted to do this for multiple plugins, what is the best way to handle that?

@artmaug

This comment has been minimized.

Copy link

artmaug commented Jul 4, 2018

+1

@ebetancourt

This comment has been minimized.

Copy link

ebetancourt commented Aug 8, 2018

@toddcavanaugh I created a fork that will do this for multiple plugins: https://gist.github.com/ebetancourt/89b105d7334495535415799832511938

@markandcurry

This comment has been minimized.

Copy link

markandcurry commented Nov 3, 2018

Very helpful. Thanks!

@cliffordp

This comment has been minimized.

Copy link

cliffordp commented May 29, 2019

Plugin to do this for files with version control: https://github.com/cliffordp/tk-exclude-vcs-updates

@reatlat

This comment has been minimized.

Copy link

reatlat commented Jun 12, 2019

Great!
Thank you!

@juliovedovatto

This comment has been minimized.

Copy link

juliovedovatto commented Jul 17, 2019

Great tip! Thanks dude 👍

A dev from work decided to "extend" a plugin, without telling the whole team about.

So I had to add this hook to avoid oficial plugin updates. Not the ideal approach but it will solve the problem and avoid future problems.

@amjo

This comment has been minimized.

Copy link

amjo commented Nov 13, 2019

how do we actually use this after placing it in the function.php

@reatlat

This comment has been minimized.

Copy link

reatlat commented Nov 13, 2019

how do we actually use this after placing it in the function.php

Only hardcoded use ;)

replace plugin-folder/plugin.php to your plugin ;)

@amjo

This comment has been minimized.

Copy link

amjo commented Nov 13, 2019

how do we actually use this after placing it in the function.php

Only hardcoded use ;)

replace plugin-folder/plugin.php to your plugin ;)

Thank you so much

@reatlat

This comment has been minimized.

Copy link

reatlat commented Nov 13, 2019

how do we actually use this after placing it in the function.php

Only hardcoded use ;)
replace plugin-folder/plugin.php to your plugin ;)

Thank you so much

take a look this fork https://gist.github.com/ebetancourt/89b105d7334495535415799832511938

This for allow you push an array of plugins to disable a bunch of them ;)

@amjo

This comment has been minimized.

Copy link

amjo commented Nov 14, 2019

how do we actually use this after placing it in the function.php

Only hardcoded use ;)
replace plugin-folder/plugin.php to your plugin ;)

Thank you so much

take a look this fork https://gist.github.com/ebetancourt/89b105d7334495535415799832511938

This for allow you push an array of plugins to disable a bunch of them ;)

To be honest, i saw this link above, and actually went ahead with that! :) this is superb!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.