2.4k questions

2.4k answers

99.5k users

Categories

0 votes
99 views

How can I stop Contact Form 7 from being updated? using function.php
in WordPress by (95.8k points)

1 Answer

0 votes

From the link, I find a piece of code that implements the task.WordPress - Disable specific plugin update checkWordPress - Disable specific plugin update check. GitHub Gist: instantly share code, notes, and snippets.

https://gist.github.com/rniswonger/ee1b30e5fd3693bb5f92fbcfabe1654d

/**

* Prevent update notification for plugin

Disable updates for 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' );

by (95.8k points)
...