While working locally , it does not work on the QC site.
Import locations also is not working on the QC site.
Research
On the local dev box the JS http://localhost/wp-content/plugins/slp-power/js/slppower-admin-locations-tab.js?ver=1747156686 is loading.
This is NOT loading on the QC site.
Install File Check
Both the uncompressed and minified slppower-admin-locations-tab*js exist in the zip install package for POWER.
Execution
\SLP_BaseClass_Admin::enqueue_admin_javascript() in the base plugin is responsible for loading the scripts.
Hook: store-locator-plus_page_slp_manage_locations
Tab: manage_locations
Handle: slp_admin_script
File: http://localhost/wp-content/plugins/store-locator-plus js/admin-locations-tab.js
Handle: slppower_manage_locations
File: http://localhost/wp-content/plugins/slp-power js/slppower-admin-locations-tab.js
On QC…
- \SLP_Object_With_Objects::initialize() is being logged many times (as expected)
- \SLP_BaseClass_Admin::initialize() is NEVER being logged… why?!?!?
The \SLP_Power_Admin object is instantiated via the SLP module system via the SLP_BaseClass_Addon property admin_class_name.
- This is executed via \SLP_BaseClass_Addon::slp_init()
- via add_action( ‘slp_admin_menu_starting’, [ $this, ‘createobject_Admin’ ], 5 );
- Which requires if ( ! empty( $this->admin_class_name ) ) {
- \SLP_Admin_UI::create_admin_menu() fires do_action ‘slp_admin_menu_starting‘
Logging:
Local
adding action slp_admin_starting => createobject_Admin
SLP_Actions::init -
add_action( admin_menu )
SLP_Actions::admin_menu
SLP_Admin_UI::initialize for SLPlus base plugin
SLP_BaseClass_Admin::initialize()
SLP_BaseClass_Admin::
add_hooks_and_filters()
SLP_Admin_UI::create_admin_menu
SLP_BaseClass_Addon::
createobject_Admin loading class SLP_Power_Admin
SLP_BaseClass_Admin::initialize()
SLP_BaseClass_Admin::
add_hooks_and_filters()
SLP_BaseClass_Addon::
createobject_Admin called twice.
SLP_BaseClass_Admin::
enqueue_admin_javascript() - hook = store-locator-plus_page_slp_manage_locations
SLP_BaseClass_Admin::
enqueue_admin_javascript() -
Enqueueing slp_admin_script : js/admin.js
SLP_BaseClass_Admin::
enqueue_admin_javascript() - tab = manage_locations for hook = store-locator-plus_page_slp_manage_locations
SLP_BaseClass_Admin::enqueue_admin_javascript() - Enqueueing slp_manage_locations : js/admin-locations-tab.js
SLP_BaseClass_Admin::enqueue_admin_javascript() - hook = store-locator-plus_page_slp_manage_locations
SLP_BaseClass_Admin::enqueue_admin_javascript() - tab = manage_locations for hook = store-locator-plus_page_slp_manage_locations
SLP_BaseClass_Admin::enqueue_admin_javascript() - Enqueueing slppower_manage_locations : js/slppower-admin-locations-tab.js
QC
adding action slp_admin_starting => createobject_Admin
SLP_Actions::init -
add_action( admin_menu )
Resolution
Looks like the SLP code is correct.
WP was not firing the ‘admin_menu’ hook on QC.
It MAY have been firing the network_admin_menu or user_admin_menu hook, HOWEVER those should ONLY be active on multisite installs. QC is not multisite.
While investigating going into the User Profile on the QC site and re-saving after changing the website for the user , the problem went away.
WTF WordPress.