ok, i was hoping there was a common pitfall for ending up with an empty wp_scripts. i’ll dig around some more.
I just need the version of the default registered jquery. googleapis cdn hasn’t added 1.12.3 to their line-up yet, so i’m using this snippet to prevent a missing jquery.js file from bringing the site down:
$system_jquery = $GLOBALS['wp_scripts']->registered['jquery'];
wp_deregister_script('jquery');
wp_deregister_script('jquery-migrate');
wp_enqueue_script('jquery', "//ajax.googleapis.com/ajax/libs/jquery/{$system_jquery->ver}/jquery.min.js", [], $system_jquery->ver, true);
add_filter('script_loader_src', function($src, $handle = null) use($system_jquery){
static $add_jquery_fallback = false;
if ($add_jquery_fallback) { ?>
<script>window.jQuery || document.write('<script src="//code.jquery.com/jquery-<?= $system_jquery->ver ?>.min.js"><\/script>')</script>
<script>window.jQuery || document.write('<script src="<?= includes_url('/js/jquery/jquery.js') ?>"><\/script>')</script>
<script>if ($ !== window.jQuery) $ = window.jQuery</script>
<? }
$add_jquery_fallback = ($handle === 'jquery');
return $src;
}, 10, 2);