Forked from rniswonger/wp-disable-plugin-update.php
Created
February 24, 2022 13:23
-
-
Save wy4tt34rp/1a8a05d9275ab37cdfeae20f4e89cd6e to your computer and use it in GitHub Desktop.
WordPress - Disable specific plugin update check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment