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.

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.