This is an issue with the updates to the My Profile interface from the 2602.01.01 version of the SLP SaaS platform.
Going to My Profile | Cancel Subscription is no longer working. It appears to post to the backend for processing, but there is not notification of cancellation and there is no update to the status.

Resolution
From Junie (phpStorm AI Agent)…
The issue was that the "Cancel Subscription" button in the React-based `ProfileSubscription` component did not have a `value` attribute. When the form was submitted by clicking this button, the browser sent `recurring_payments_cancel=` (an empty value) to the backend. The backend PHP code in `MySLP_Customer_Profile::cancel_subscription` checks `if ( empty( $_POST['recurring_payments_cancel'] ) )`, which evaluates to true for an empty string, causing the cancellation request to be ignored.
I have updated `WordPress/wp-content/plugins/myslp-dashboard/src/profile_subscription/profile_subscription.tsx` to add `value="cancel"` to the "Cancel Subscription" button. This ensures that `$_POST['recurring_payments_cancel']` will contain the string "cancel" when the form is submitted, allowing the backend to process the request correctly.
### Changes made:
- Modified `WordPress/wp-content/plugins/myslp-dashboard/src/profile_subscription/profile_subscription.tsx`
- Added `value="cancel"` to the `Button` component with `name="recurring_payments_cancel"`.

Git Repo Updates
MySLP Dashboard
repo: Store-Locator-Plus/myslp-dashboard
path: WordPress/wp-content/plugins/myslp-dashboard

MySLP Payments
repo: Store-Locator-Plus/myslp-payments
path: WordPress/wp-content/plugins/myslp-payments

Findings
The form post is being sent to the backend where is is eventually processed by MySLP_Customer_Profile->cancel_subscription() (see Call Stack below).
Call Stack
MySLP_Customer_Profile.php:96, MySLP_Customer_Profile->cancel_subscription()
MySLP_Customer_Profile.php:74, MySLP_Customer_Profile->do_when_plugins_loaded()
MySLP_Customer_Profile.php:42, MySLP_Customer_Profile->initialize()
base_class.object.php:37, SLPlus_BaseClass_Object->__construct()
MySLP_Customer_Profile.php:534, require_once()
myslp-dashboard.php:51, myslp_customer_interfaces_loader()
myslp-dashboard.php:55, {closure:/var/www/html/wp-content/mu-plugins/myslp-dashboard/myslp-dashboard.php:46-56}()
class-wp-hook.php:324, WP_Hook->apply_filters()
class-wp-hook.php:348, WP_Hook->do_action()
plugin.php:517, do_action()
wp-settings.php:506, require_once()
wp-config.php:133, require_once()
wp-load.php:50, require_once()
admin-ajax.php:22, {main}()
Short Circuit – Drop Out
The process is not completed due to this sanity check in \MySLP_Customer_Profile::cancel_subscription
if ( empty( $_POST['recurring_payments_cancel'] ) ) {
return;
}
Need to determine why $_POST[‘recurring_payments_cancel’] is empty.
The Post Values
$_POST = Array
(
[recurring_payments_cancel_nonce] => 33eac0c246
[PROFILEID] => sub_1SzL80BvHKfBw2LGWoghfK2a
[user_id] => 902
[recurring_payments_cancel] =>
)
Second Issue – After Fixing Empty $_POST Value
[11-Feb-2026 18:58:09 UTC] PHP Warning: foreach() argument must be of type array|object, string given in /var/www/html/wp-content/mu-plugins/myslp-payments/include/module/stripe/lib/ApiRequestor.php on line 474
[11-Feb-2026 18:58:09 UTC] PHP Stack trace:
[11-Feb-2026 18:58:09 UTC] PHP 1. {main}() /var/www/html/wp-admin/admin.php:0
[11-Feb-2026 18:58:09 UTC] PHP 2. require_once() /var/www/html/wp-admin/admin.php:34
[11-Feb-2026 18:58:09 UTC] PHP 3. require_once() /var/www/html/wp-load.php:50
[11-Feb-2026 18:58:09 UTC] PHP 4. require_once() /var/www/html/wp-config.php:133
[11-Feb-2026 18:58:09 UTC] PHP 5. do_action($hook_name = 'plugins_loaded') /var/www/html/wp-settings.php:506
[11-Feb-2026 18:58:09 UTC] PHP 6. WP_Hook->do_action($args = [0 => '']) /var/www/html/wp-includes/plugin.php:517
[11-Feb-2026 18:58:09 UTC] PHP 7. WP_Hook->apply_filters($value = '', $args = [0 => '']) /var/www/html/wp-includes/class-wp-hook.php:348
[11-Feb-2026 18:58:09 UTC] PHP 8. {closure:/var/www/html/wp-content/mu-plugins/myslp-dashboard/myslp-dashboard.php:46-56}('') /var/www/html/wp-includes/class-wp-hook.php:324
[11-Feb-2026 18:58:09 UTC] PHP 9. myslp_customer_interfaces_loader() /var/www/html/wp-content/mu-plugins/myslp-dashboard/myslp-dashboard.php:55
[11-Feb-2026 18:58:09 UTC] PHP 10. require_once() /var/www/html/wp-content/mu-plugins/myslp-dashboard/myslp-dashboard.php:51
[11-Feb-2026 18:58:09 UTC] PHP 11. SLPlus_BaseClass_Object->__construct($options = *uninitialized*) /var/www/html/wp-content/mu-plugins/myslp-dashboard/include/customer_profile/MySLP_Customer_Profile.php:546
[11-Feb-2026 18:58:09 UTC] PHP 12. MySLP_Customer_Profile->initialize() /var/www/html/wp-content/mu-plugins/store-locator-plus/include/base_class.object.php:37
[11-Feb-2026 18:58:09 UTC] PHP 13. MySLP_Customer_Profile->do_when_plugins_loaded() /var/www/html/wp-content/mu-plugins/myslp-dashboard/include/customer_profile/MySLP_Customer_Profile.php:43
[11-Feb-2026 18:58:09 UTC] PHP 14. MySLP_Customer_Profile->cancel_subscription() /var/www/html/wp-content/mu-plugins/myslp-dashboard/include/customer_profile/MySLP_Customer_Profile.php:85
[11-Feb-2026 18:58:09 UTC] PHP 15. stripe\MySLP_Stripe_Payments->cancel_subscription() /var/www/html/wp-content/mu-plugins/myslp-dashboard/include/customer_profile/MySLP_Customer_Profile.php:121
[11-Feb-2026 18:58:09 UTC] PHP 16. Stripe\Subscription->cancel($params = 'sub_1SzL80BvHKfBw2LGWoghfK2a', $opts = *uninitialized*) /var/www/html/wp-content/mu-plugins/myslp-payments/include/module/stripe/MySLP_Stripe_Payments.php:104
[11-Feb-2026 18:58:09 UTC] PHP 17. Stripe\ApiResource->_request($method = 'delete', $url = '/v1/subscriptions/sub_1SzL80BvHKfBw2LGWoghfK2a', $params = 'sub_1SzL80BvHKfBw2LGWoghfK2a', $options = NULL, $usage = *uninitialized*, $apiMode = *uninitialized*) /var/www/html/wp-content/mu-plugins/myslp-payments/include/module/stripe/lib/Subscription.php:272
[11-Feb-2026 18:58:09 UTC] PHP 18. Stripe\ApiResource::_staticRequest($method = 'delete', $url = '/v1/subscriptions/sub_1SzL80BvHKfBw2LGWoghfK2a', $params = 'sub_1SzL80BvHKfBw2LGWoghfK2a', $options = class Stripe\Util\RequestOptions { public $apiKey = 'sk_test_********************88u0'; public $headers = []; public $apiBase = NULL }, $usage = [], $apiMode = 'v1') /var/www/html/wp-content/mu-plugins/myslp-payments/include/module/stripe/lib/ApiOperations/Request.php:44
[11-Feb-2026 18:58:09 UTC] PHP 19. Stripe\ApiRequestor->request($method = 'delete', $url = '/v1/subscriptions/sub_1SzL80BvHKfBw2LGWoghfK2a', $params = 'sub_1SzL80BvHKfBw2LGWoghfK2a', $headers = [], $apiMode = 'v1', $usage = []) /var/www/html/wp-content/mu-plugins/myslp-payments/include/module/stripe/lib/ApiOperations/Request.php:111
[11-Feb-2026 18:58:09 UTC] PHP 20. Stripe\ApiRequestor->_requestRaw($method = 'delete', $url = '/v1/subscriptions/sub_1SzL80BvHKfBw2LGWoghfK2a', $params = 'sub_1SzL80BvHKfBw2LGWoghfK2a', $headers = [], $apiMode = 'v1', $usage = []) /var/www/html/wp-content/mu-plugins/myslp-payments/include/module/stripe/lib/ApiRequestor.php:135
[11-Feb-2026 18:58:09 UTC] PHP 21. Stripe\ApiRequestor->_prepareRequest($method = 'delete', $url = '/v1/subscriptions/sub_1SzL80BvHKfBw2LGWoghfK2a', $params = 'sub_1SzL80BvHKfBw2LGWoghfK2a', $headers = [], $apiMode = 'v1') /var/www/html/wp-content/mu-plugins/myslp-payments/include/module/stripe/lib/ApiRequestor.php:518
Need to use the new Stripe API method to cancel a subscription in \stripe\MySLP_Stripe_Payments::cancel_subscription:
// -- cancel
try {
$stripe = new StripeClient($this->get_api_key());
$updatedSubscription = $stripe->subscriptions->cancel( $this->subscription->id, [] );
} catch ( InvalidRequestException $e ) {
return new WP_Error( 'stripe_error', $e->getMessage() );
}
$this->subscription = $updatedSubscription;
AI Agents Report
All AI interactions were through phpStorm AI Chat.
Junie
Junie is the built-in phpStorm IDE task agent. It only has current context based on the files loaded in the IDE.
Junie provided a solution in minutes along with a direct edit of the code to patch the issue. You can see this in the Resolution section noted above.
Chat : deepseek-coder-v2:latest
This query was performed by the MCP server connection to a DGX Spark running Ollama with an MCP server hosting Qdrant for RAG queries. The RAG system was employed and managed via OpenClaw and has ingested the Internal and Docs sites for StoreLocatorPlus.com as well as the code repositories for the platform.
The query was not performed in an efficient manner and shifted a burden of the work to the user.
It also crafted a solution that was not well formed or easy to implement.
Prompt
Where is the "Cancel Subscription" React button rendered? It should be in the myslp-dashboard plugin as a source .tsx element.
Response
To resolve the issue where the "Cancel Subscription" button is not sending a `$_POST` variable to the backend, we need to ensure that the form submission for canceling the subscription is correctly handled and processed. Based on the provided context attachments, it appears that there are several steps involved in this process. Let's break down the necessary changes:
1. **Ensure Form Action and Method**: Verify that the form action (`action=""`) and method (`method="POST"`) for canceling the subscription are correctly set. This should be part of the `<form>` tag within your React component.
2. **Correct Nonce Verification**: Ensure that the nonce verification is correctly handled on the server side to prevent CSRF attacks. The provided code already includes a nonce (`recurring_payments_cancel_nonce`), which should be verified using `wp_verify_nonce()`.
3. **Form Submission Handling**: Modify the React component to ensure that the form submission triggers the correct action and method, including passing necessary parameters like the user ID and nonce.
Here's how you can modify the `ProfileSubscription` component in `profile_subscription.tsx`:
```textmate
import React from "react";
import domReady from "@wordpress/dom-ready";
import { createRoot } from "@wordpress/element";
import { __ } from '@wordpress/i18n';
import { Box, Button, Grid } from '@mui/material';
import SLPGlobalStyles from "@components/SLPGlobalStyles";
// Assuming you have the necessary imports and setup for slpReact and other hooks
export const ProfileSubscription: React.FC = () => {
// Your existing state and effect logic here...
return (
<Box sx={{ flexGrow: 1 }}>
<SLPGlobalStyles />
<Grid container spacing={2} sx={{ mb: 4 }}>
{/* Existing content */}
</Grid>
{/* Add the Cancel Subscription Button within a Form */}
<form action="" method="POST">
<input type="hidden" name="recurring_payments_cancel_nonce" value={sub.nonces.recurring_payments_cancel} />
<input type="hidden" name="user_id" value={sub.user_id} />
<Button
type="submit"
variant="outlined"
color="error"
sx={{ mt: 2, ml: 'auto' }} // Align to the right
>
{__('Cancel Subscription', 'myslp')}
</Button>
</form>
</Box>
);
};
domReady(() => {
const rootElement = document.getElementById('profile_subscription');
if (rootElement) {
const root = createRoot(rootElement);
root.render(<ProfileSubscription />);
}
});
```
### Backend Changes:
Ensure that the `cancel_subscription` method in `MySLP_Customer_Profile.php` correctly handles the form submission and nonce verification:
```php
public function cancel_subscription() {
if ( empty( $_POST['recurring_payments_cancel'] ) ) {
return;
}
if ( ! wp_verify_nonce( $_POST['recurring_payments_cancel_nonce'], 'recurring_payments_cancel' ) ) {
return;
}
// Proceed with the cancellation logic here...
}
```
### Summary:
- Ensure the form action and method are set correctly.
- Verify the nonce using `wp_verify_nonce()`.
- Pass necessary parameters like user ID and nonce in the form submission.
By following these steps, you should be able to resolve the issue where the "Cancel Subscription" button is not sending a `$_POST` variable to the backend.