WordPress users often face the dilemma of wanting to disable update checks for specific plugins while keeping others up-to-date. This is particularly useful when a plugin update breaks functionality or when a user has made custom modifications to a plugin. A simple PHP code snippet can be added to a theme's functions.php
file to achieve this.
The code snippet hooks into WordPress's site_transient_update_plugins
filter, allowing it to modify the update check response. By unsetting the response for specific plugins, WordPress is tricked into thinking there are no updates available for those plugins.
plugin-folder/plugin.php
).functions.php
file.$pluginsToDisable
array in the code to include the plugins you've identified.By implementing this code snippet, WordPress users can maintain control over their plugin updates, ensuring that custom modifications are preserved and potential update-related issues are mitigated.