Hide wordpress console log: JQMIGRATE: Migrate is installed, version 3.4.1 Fixed

It’s really anoying when noticed the below warning logs in wordpress console:

JQMIGRATE: Migrate is installed, version 3.4.1

You could make it dispear by adding the following code in `functions.php` file.

if ( !function_exists( 'none_disp_jquery_migrate' ) ){
    function none_disp_jquery_migrate( ) {
        $migrate = $GLOBALS['wp_scripts']->registered['jquery-migrate'];
        $migrate->extra['before'][]='temp_jm_logconsole = window.console.log; window.console.log=null;';
        $migrate->extra['after'][]='window.console.log=temp_jm_logconsole;';
    }
    add_action( 'init', 'none_disp_jquery_migrate' );
}

And then refresh your web page and it should be no show anymore.

Leave a Comment