'Does anyone know why is Wordpress not able to detect my JQuery File?

I was recently migrating my static Jquery file to CDN. But I don't know its not recognizing. I have inserted this code in functions.php

add_action( 'wp_enqueue_scripts', 'jquery_bind' );
function jquery_bind() {
// instead of "jquery-core" just "jquery", to disable jquery-migrate
wp_deregister_script( 'jquery-core-js' );
wp_register_script( 'jquery-core', 'https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js',false);
wp_enqueue_script( 'jquery' );
}

add_action( 'wp_enqueue_scripts', 'jquery_migrate_bind' );
function jquery_migrate_bind() {
wp_deregister_script( 'jquery-migrate-js' );
wp_register_script( 'jquery-core', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-migrate/3.4.0/jquery-migrate.min.js',false);
wp_enqueue_script( 'jquery' );
}

My console is still not importing the script to my header section and I am getting this error:

console_logs

As you can see the cdn file is not in the tag

header_section

Also, how can I remove these script links I am not able to find it inside my functions.php



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source