How to easily disable updates for modified plugins on WordPress.

Marc Wag­ner

April 21, 2021

1 min read|

As a rule, plug­ins that have been imple­men­ted in a Word­­Press-com­­pli­­ant man­ner can be cus­to­mi­zed as far as pos­si­ble via hooks and by over­wri­ting tem­pla­tes.

But the­re are also excep­ti­ons that do not offer the­se func­tion­a­li­ties.

To adapt the plug­in to your web­site, you have to chan­ge the core files. Howe­ver, the­se will be over­writ­ten during an update. Howe­ver, the update func­tion of a plug­in can be dis­ab­led.

To do this, sim­ply pas­te the fol­lo­wing code into your theme’s Functions.php:

/**
 * Disable updates for recent products
 */
function disable_modified_plugin_updates( $value ) {
   unset( $value->response['plugin_folder/plugin_file.php'] );

   return $value;
}

add_filter( 'site_transient_update_plugins', 'disableModifiedPluginUpdates' );

Ide­al­ly, you should rena­me the plug­in after­wards via the respec­ti­ve PHP and README file so that you remem­ber that it is a modi­fied ver­si­on.

Note: You should ide­al­ly try to con­vin­ce the aut­hor of your chan­ge befo­re this step, so that it will be inte­gra­ted direct­ly by him. This may help other users and allow the plug­in to be updated in the future.

88e86fcb816eff22bc917094df2862d8dd5c0e978b333e6dd5f36f808990c261 96

Arti­kel von:

Marc Wag­ner

Hi Marc here. I’m the foun­der of Forge12 Inter­ac­ti­ve and have been pas­sio­na­te about buil­ding web­sites, online stores, appli­ca­ti­ons and SaaS solu­ti­ons for busi­nesses for over 20 years. Befo­re foun­ding the com­pa­ny, I alre­a­dy work­ed in publicly lis­ted com­pa­nies and acqui­red all kinds of know­ledge. Now I want to pass this know­ledge on to my cus­to­mers.

Hast du eine Fra­ge? Hin­ter­lass bit­te einen Kom­men­tar