Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
lock version for specific plugin
function wp63_lock_plugin_version($data){
$lock = apply_filters( "wp63_lock_plugin_version", array() );
if(isset( $data->response )){
foreach( $data->response as $key => $value ){
if( isset($lock[$value->slug]) && $value->new_version != $lock[$value->slug]){
$data->no_update[] = $value;
return $data;
add_filter( "pre_set_site_transient_update_plugins", "wp63_lock_plugin_version" );
// How to Use:
add_filter( "wp63_lock_plugin_version", function($data){
return array(
'jetpack' => "5.5.1"
} );
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.