Notice: Function WP_Scripts::add was called incorrectly. The script with the handle “google_maps” was enqueued with dependencies that are not registered: slp_core. Please see Debugging in WordPressfor more information. (This message was added in version 6.9.1.) in /var/www/html/wp-includes/functions.php on line 6131
\SLPlus::enqueue_google_maps_script calls enqueue scripts with slp_core as a dependency but it is missing when going to the Store Locator Plus | Locations page in the admin panel.
Reproduction
- Make sure a Google Browser key is present.
- Go to SLP | Locations from the admin panel when logged in.
Resolution
The basic description – created a script that checks if slp_core is registered and enqueued. If not call a newly-created method that registers the slp_core script and enqueues it.
See this AI Summary: Store Locator Plus (SLP) — slp_core dependency registration + WP 6.9.1 script validation
Findings
Need to find where slp_core is being called from.
It is a hook name for a WordPress script most likely set from a call to the WordPress wp_enqueue_script function.
That means the needs to happen before or with the \SLPlus::enqueue_google_maps_script calls enqueue scripts call.
Power Plugin : \SLP_Power_Pages_UI::setup_css_and_js calls wp_enqueue_script( ‘slp_core’ );
SLP Plugin: \SLP_UI::render_shortcode calls wp_enqueue_script( ‘slp_core’ );
The slp_core handle is REGISTERED in \SLP_Actions::wp_enqueue_scripts
The Problem
Some admin features in the paid plugins (Power and Premier) try to leverage Google Maps functionality within the admin interface. They also require some of the front-end JavaScript functions which are part of slp_core. The design of the app was only loading slp_core for front-end calls; If a call was made from the admin interface the slp_core script was not loaded.
AI Findings
model: gpt-5.3-codex high with slp_rag preface interactions
slp_rag: Spark Qdrant database with nightly ingestion
slp_core is coming from these code paths:
1. Admin page hook that triggers the bug
[include/module/admin/SLP_Admin_UI.php:331](/Users/lancecleveland/phpStorm Projects/WordPress/wp-content/plugins/store-locator-plus/include/module/admin/SLP_Admin_UI.php:331)
admin_enqueue_scripts is hooked to SLPlus::enqueue_google_maps_script() when page is slp_manage_locations.
2. Problematic enqueue with missing dependency
[include/SLPlus.php:396](/Users/lancecleveland/phpStorm Projects/WordPress/wp-content/plugins/store-locator-plus/include/SLPlus.php:396)
wp_enqueue_script( ‘google_maps’, …, array( ‘slp_core’ ), … )
3. Where slp_core is actually registered
[include/module/actions/SLP_Actions.php:274](/Users/lancecleveland/phpStorm Projects/WordPress/wp-content/plugins/store-locator-plus/include/module/actions/SLP_Actions.php:274)
wp_register_script( ‘slp_core’, … )
4. Why it fails on admin Locations
[include/module/actions/SLP_Actions.php:117](/Users/lancecleveland/phpStorm Projects/WordPress/wp-content/plugins/store-locator-plus/include/module/actions/SLP_Actions.php:117)
slp_core registration only happens in wp_enqueue_scripts (frontend hook), not admin_enqueue_scripts.
Extra finding: in the same frontend method, enqueue happens before register:
[include/module/actions/SLP_Actions.php:262](/Users/lancecleveland/phpStorm Projects/WordPress/wp-content/plugins/store-locator-plus/include/module/actions/SLP_Actions.php:262) calls enqueue_google_maps_script() before line 274 registers slp_core.
With WP 6.9.1 dependency checks, that order is now invalid too.