As we have different situation here, according to it we have modified the core files of a plugin to complete our desired flow. But as we know, the modification in plugin core files is not a good approach.

So, in that case we do not want to update plugin for its future versions. To do this for this particular plugin we just need to put our below mentioned code in our theme’s functions.php file :

/* Function for hiding plugin update notices – Exclude Pages*/

function sunil_disable_updates( $value ) {
   unset( $value->response['exclude-pages/exclude_pages.php'] );
   return $value;
}
add_filter( 'site_transient_update_plugins', 'sunil_disable_updates' );

In above code we have taken an example of a plugin named “Exclude Pages”. Look at the above code where

  • “exclude-pages” is the name of plugin folder
  • “exclude_pages.php” is the main plugin file

After putting this code in functions.php file, plugin update notices for this specific plugin will disappears automatically. In the same manner we can also do this for more plugins of our choice.