@jaswsinc - you’re a legend mate - thanks so much for this.
For those wanting to do something similar, here’s the code I used, in conjunction with the ‘Insert php’ plugin - it has 100k+ downloads, and let’s you insert php into posts and pages, via a shortcode.
Here is the code I used, after activating that plugin.
I may get this coded into a template though, if allowing php execution on posts and pages causes a security issue.
If you are logged into a paid PREMIUM account - you will see your cancellation options below.
[insert_php]
$gateway = get_user_option('s2member_subscr_gateway');
if ($gateway === 'paypal') : ?>
<strong>It looks like you paid for your PREMIUM subscription via PayPal.</strong>
Hit the 'Unsubscribe' button below and log in to your PayPal account to cancel your recurring subscription.
Your PREMIUM membership will be downgraded to a FREE account at the end of your current subscription term.
[s2Member-PayPal-Button cancel="1" image="default" output="anchor" /]
<?php elseif ($gateway === 'stripe') : ?>
<strong>It looks like you paid for your PREMIUM subscription via credit/debit card.</strong>
Complete the security validation below, then hit 'Submit Form' to cancel your payments now.
Your PREMIUM membership will be downgraded to a FREE account at the end of your current subscription term.
[s2Member-Pro-Stripe-Form cancel="1" desc="This will cancel your account. Are you sure?" unsub="0" captcha="light" /]
<?php endif; [/insert_php]
It seems to work very well.