I use the bellow function to disable a plugin update. It works, because I use an old version of this plugin and it does not show me that a newer version exists, but, however, I get a warning on line 2: Attempt to modify property of non-object. How to fix this?

function my_filter_plugin_updates( $value ) {
   unset( $value->response['duplicator/duplicator.php'] ); //Duplicator
   return $value;
}
add_filter( 'site_transient_update_plugins', 'my_filter_plugin_updates' );

Read more here: ‘Attempt to modify property of non-object’ warning


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , ,

Wordpress related questions and answers: