I’m curious why Pro includes jquery 1.12.4 instead of more recent 3+ versions?
Hi,
Pro uses Wordpress jquery file.
If you would like to use the latest version, you can deregister the default jequery and add the latest using the code below.
add_action('wp_enqueue_scripts', 'no_more_jquery');
function no_more_jquery(){
wp_deregister_script('jquery');
wp_register_script('jquery', "http" .
($_SERVER['SERVER_PORT'] == 443 ? "s" : "") .
"://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js", false, null);
wp_enqueue_script('jquery');
}
You can add it in your child theme’s functions.php file.
For more information kindly refer to the links below.
https://developer.wordpress.org/reference/functions/wp_enqueue_script/
Hope that helps.
1 Like