PHPWooCommerceWordPress

How to disable updates for sepcific plugin in WordPress

0
219
2019 / 08 / 30

Sometimes you do not wish to get updates and their notification for a plugin in the updates page. Although it is alwasy recommended to keep updated plugins for security and new features.

However, there may be a case when updating a plugin may crash your site and you have to rollback the update keep that version.

There is a simple fix which will not only disable updates for particular plugin, but you will also not see any updates in the updates pages of WordPress.

Add following PHP snippet in the theme’s functions.php file.

function filter_plugin_updates( $value ) {
    unset( $value->response['divi-builder/divi-builder.php'] );
    return $value;
}
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );

 

Here “divi-builder” is name of directory and “divi-builder.php” is the main plugin file where it has plugin information.

 

At the time of posting this article, the latest version for Divi Builder was 2.27.4 and its update was visible in the updates page:

After adding above PHP snippet in functions.php, the update notification was removed.

 

Thats all!