Imagine you are using WordPress and all of a sudden a popup notice appears that reads

Does this sound familier? You may have figured out that this points to load-scripts.php in your console when you updated WordPress core to 4.5 or later. But how do you get this notice to disappear?

The good news is, this is not an error. You may have become accustomed to seeing this notice in your console and may be wondering what can be done to get rid of it. Does something need updated? A change to your code perhaps?

The truth is that WordPress utilizes the jQuery migrate script to make sure there is backwards compatibility for any plugins or themes that you might be using which the use functionality is removed from newer versions of jQuery.

When WordPress 4.5 was released, the platform seems to have upgraded the version of jQuery migrate from v1.2.1 to v1.4.0. This means that after some analysis, the code reveals that the v1.4.0 which logs the script is loaded regardless of whether or not the migrateMute option is set. This exists in both the uncompressed and minified versions.

The only way to get rid of the notice is to make sure that all your plugins and themes don’t rely on any old jQuery functionality. After that, you can eliminate the migrate script. There is a plugin out there to do this, but below is quite an easy method that can just be put in your theme’s functions file or similar:

add_action('wp_default_scripts', function ($scripts) {
   	 if (!empty($scripts->registered['jquery'])) {
 $scripts->registered['jquery']->deps = array_diff($scripts->registered['jquery']->deps, ['jquery-migrate']);
  	  }
  });

A quick note: This correction is based on pure aesthetics and is not necessary for your site to function properly.