Skip to content

Instantly share code, notes, and snippets.

@deanoakley
deanoakley / wp-disable-plugin-update.php
Last active March 22, 2024 09:30 — forked from rniswonger/wp-disable-plugin-update.php
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] );
@rniswonger
rniswonger / wp-disable-plugin-update.php
Last active January 3, 2024 15:21
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'] );
}