REST Route Missing Permissions Callback SLP_REST_HANDLER

[03-Feb-2025 22:35:07 UTC] PHP Notice:  Function register_rest_route was called incorrectly. 

The REST API route definition for myslp/v2/locations/(?P\d+) is missing the required permission_callback argument. 

For REST API routes that are intended to be public, use __return_true as the permission callback. Please see <a>Debugging in WordPress</a> for more information. (This message was added in version 5.5.0.) in /var/www/html/wp-includes/functions.php on line 6031

Resolved in 2502.05.01

Add permission call back to check for manage_slp role on REST endpoint for location management.

SLP set_database_meta on null

Fatal error: Uncaught Error: Call to a member function set_database_meta() on null in /var/www/html/wp-content/plugins/store-locator-plus/include/module/admin/SLP_Admin_Activation.php:450

New local docker WP install activating SLP on clean database.

Resolution

This bug was resolved already.

\SLP_Data::initialize() no longer calls $this->set_database_meta(); on a fresh database installation.

AI Analysis

From gpt-5.3-codex (high) with a RAG hook via a proxy interface on the Spark…

Script 2025-06-18 15:04:06 -0400 345) 
b77cbd0e3 include/module/admin/SLP_Admin_Activation.php (SaaS Update Script 2025-06-18 15:04:06 -0400 346) 		if ( ! defined( 'MYSLP_VERSION' ) ) {
b77cbd0e3 include/module/admin/SLP_Admin_Activation.php (SaaS Update Script 2025-06-18 15:04:06 -0400 347) 			$this->check_for_addon_updates();
b77cbd0e3 include/module/admin/SLP_Admin_Activation.php (SaaS Update Script 2025-06-18 15:04:06 -0400 348) 		}
727b4970a include/SLP_Activation.php                    (Lance Cleveland    2017-12-28 11:20:55 -0500 349) 	}
727b4970a include/SLP_Activation.php                    (Lance Cleveland    2017-12-28 11:20:55 -0500 350) 

diff --git a/include/module/admin/SLP_Admin_Activation.php b/include/module/admin/SLP_Admin_Activation.php
index f9bd70e9..132cfb50 100644
--- a/include/module/admin/SLP_Admin_Activation.php
+++ b/include/module/admin/SLP_Admin_Activation.php
@@ -10,7 +10,7 @@ class SLP_Admin_Activation extends SLPlus_BaseClass_Object {
 	/**
 	 * Add roles and cap.
 	 */
-	private function add_slplus_roles_and_caps() {
+	private function add_slplus_roles_and_caps(): void {
 		$role = get_role( 'administrator' );
 		if ( is_object( $role ) && ! $role->has_cap( 'manage_slp_admin' ) ) {
 			$role->add_cap( 'manage_slp' );
@@ -24,7 +24,7 @@ class SLP_Admin_Activation extends SLPlus_BaseClass_Object {
 	 *
 	 * @return bool
 	 */
-	public function being_deactivated() {
+	public function being_deactivated(): bool {
 		if ( empty( $_REQUEST ) ) {
 			return false;
 		}
@@ -48,7 +48,7 @@ class SLP_Admin_Activation extends SLPlus_BaseClass_Object {
 	/**
 	 * Check if there are any add on updates.  Inactive plugins too.
 	 */
-	private function check_for_addon_updates() {
+	private function check_for_addon_updates(): void {
 		$plugins = get_plugins();  // contains all plugins active or not key = slug (store-locator-le/store-locator-le.php)
 
 		// Check all plugins

Cause is very likely a hook-order race on fresh installs.
1.
SLP_Admin_Activation::update() is invoked on plugins_loaded via [SLPlus.php:349](/Users/lancecleveland/phpStorm Projects/WordPress/wp-content/plugins/store-locator-plus/include/SLPlus.php:349) and [SLPlus.php:359](/Users/lancecleveland/phpStorm Projects/WordPress/wp-content/plugins/store-locator-plus/include/SLPlus.php:359).
2.
slplus->database is only created later on WP init in [SLP_Actions.php:103](/Users/lancecleveland/phpStorm Projects/WordPress/wp-content/plugins/store-locator-plus/include/module/actions/SLP_Actions.php:103) and [SLP_Actions.php:106](/Users/lancecleveland/phpStorm Projects/WordPress/wp-content/plugins/store-locator-plus/include/module/actions/SLP_Actions.php:106).
3.
In the failing build, activation line ~450 calls $this->slplus->database->set_database_meta() during fresh install, so database is still null and fatals.
4.
This exact issue was already fixed upstream in commit 21478780 (Jan 7, 2025) by removing that activation-time call.
Suggested patches (no code changed yet):
1.
Recommended backport: remove the fresh-install call to $this->slplus->database->set_database_meta() from SLP_Admin_Activation::update() (the exact 21478780 fix).
2.
Defensive hardening: if you keep any similar call, guard with isset($this->slplus->database) and is_object(...) before method invocation.
3.
Lifecycle hardening (optional): run version/activation update on init (after DB object creation) instead of plugins_loaded, or split update logic so anything touching slplus->database runs only after init.
Note: your local checkout at WordPress/wp-content/plugins/store-locator-plus already appears to have this fix; the reported crash likely comes from an older packaged artifact (stale Docker/plugin build) missing commit 21478780.

Categories Bug

Reproduce

  • Login as Super Admin (SA)
  • menu item : MySLP / Customers
  • switch to <???>
  • menu item: SLP / Categories

Report

See screen shot as how it shows in Staging , on the Categories page,

a bunch of script under locations but only the first one Named Distribution shows the script

[19-Nov-2024 15:11:30 UTC] 
PHP Deprecated:  Creation of dynamic property SLP_Power_Category_Manager::$wp_categories_by_id is deprecated 
in /var/www/html/wp-content/
plugins/slp-power/include/module/category/SLP_Power_Category_Manager.php 
on line 274

Deprecated Return Types In Stripe Library

Deprecated:
Return type of Stripe\Util\CaseInsensitiveArray::offsetExists($offset) 
Return type of Stripe\Util\CaseInsensitiveArray::offsetGet($offset)
Return type of Stripe\Util\CaseInsensitiveArray::offsetSet($offset, $value)
Return type of Stripe\Util\CaseInsensitiveArray::offsetUnset($offset)
Return type of Stripe\Util\CaseInsensitiveArray::count() 
Return type of Stripe\Util\CaseInsensitiveArray::getIterator() 
Return type of Stripe\Util\Set::getIterator() 
Return type of Stripe\StripeObject::offsetExists($k) 
Return type of Stripe\StripeObject::offsetGet($k) 
Return type of Stripe\StripeObject::offsetSet($k, $v) 
Return type of Stripe\StripeObject::offsetUnset($k) 
Return type of Stripe\StripeObject::count() 
Return type of Stripe\StripeObject::jsonSerialize() 
Return type of Stripe\Collection::getIterator()

Detailed Example

Deprecated: 
Return type of Stripe\Util\CaseInsensitiveArray::offsetExists($offset) 
should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, 
or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in 
/var/www/html/wp-content/mu-plugins/myslp-payments/include/module/stripe/lib/Util/CaseInsensitiveArray.php on line 44 

Call Stack: 0.0001 464728 
1. {main}() /var/www/html/wp-admin/admin.php:0 0.4073 9234784 
2. do_action($hook_name = 'toplevel_page_myslp_profile') /var/www/html/wp-admin/admin.php:259 0.4073 9235000 
3. WP_Hook->do_action($args = [0 => '']) /var/www/html/wp-includes/plugin.php:517 0.4073 9235000 
4. WP_Hook->apply_filters($value = '', $args = [0 => '']) /var/www/html/wp-includes/class-wp-hook.php:348 0.4073 9235432 
5. MySLP_Customer_Profile->page_profile('') /var/www/html/wp-includes/class-wp-hook.php:324 0.4079 9250552 
6. require_once('/var/www/html/wp-content/plugins/myslp-customer-profile/views/view.profile.php') /var/www/html/wp-content/plugins/myslp-customer-profile/include/MySLP_Customer_Profile.php:259 0.4079 9250552 
7. MySLP_Recurring_Payments->get_subscription_details($user_id = 592, $force = TRUE) /var/www/html/wp-content/plugins/myslp-customer-profile/views/view.profile.php:19 0.4113 9252720 
8. MySLP_Stripe_Payments->get_subscription_details($subscription_id = 'sub_Gycmzo5SSaE1Wd') /var/www/html/wp-content/mu-plugins/myslp-payments/include/module/MySLP_Recurring_Payments.php:154 0.4113 9252720 
9. MySLP_Stripe_Payments->load_lib() /var/www/html/wp-content/mu-plugins/myslp-payments/include/module/stripe/MySLP_Stripe_Payments.php:418 0.4115 9253216 
10. require_once('/var/www/html/wp-content/mu-plugins/myslp-payments/include/module/stripe/init.php') /var/www/html/wp-content/mu-plugins/myslp-payments/include/module/stripe/MySLP_Stripe_Payments.php:435 0.4119 9253760 
11. require('/var/www/html/wp-content/mu-plugins/myslp-payments/include/module/stripe/lib/Util/CaseInsensitiveArray.php') /var/www/html/wp-content/mu-plugins/myslp-payments/include/module/stripe/init.php:7 
Deprecated: Return type of Stripe\Util\CaseInsensitiveArray::offsetGet($offset)

System Info

Dev Notes

Related

Resolution

The Stripe API library included in the myslp-payments plugin was outdated.

This was already updated and in the develop branch, however the staging branch in myslp-payments was not updated to point to this latest updated.

  1. Merged the develop branch into staging on the myslp-payments repo (ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/myslp-payments) and pushed up to AWS CodeCommit.
  2. Check out staging branch on the myslp_aws_ecs_kit on local dev box.
    • Ran ./tools/update_code.sh on the local dev box.

This pushed code and committed it to the staging branch on the myslp_aws_ecs kit. This triggered CodePipline to build the new ECR image , fetching the staging branch on the myslp_aws_ecs_kit and all submodules before performing the build.