Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deanoakley/e05b9a037c5afce473b26b224a62cff5 to your computer and use it in GitHub Desktop.
Save deanoakley/e05b9a037c5afce473b26b224a62cff5 to your computer and use it in GitHub Desktop.
WordPress - Disable specific plugin update check
/**
* Prevent update notification for plugin -
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Add to the core plugin file
*/
function disable_plugin_updates( $value ) {
if ( isset($value) && is_object($value) ) {
$plugin_file_name = basename(__DIR__) . '/' . basename(__FILE__);
if ( isset( $value->response[$plugin_file_name] ) ) {
unset( $value->response[$plugin_file_name] );
}
}
return $value;
}
add_filter( 'site_transient_update_plugins', 'disable_plugin_updates' );
@verysiberian
Copy link

Awesome, thank you!

@designables
Copy link

WOW AMAZING

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment