Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

[Support request] Issues with Stripe Support/Canceling Accounts

Simple Membership Plugin › Forums › Simple Membership Plugin › Issues with Stripe Support/Canceling Accounts

  • This topic has 7 replies, 2 voices, and was last updated 2 years, 6 months ago by admin.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • March 11, 2024 at 6:30 am #27788
    openartist
    Participant

    There doesn’t appear to be a way for a user to cancel their subscription manually (only tested wit Stripe), there’s nothing I could find in documentation. What would be an easy way to add a link that allows this functionality WITHOUT deleting the account? ie downgrades to free and cancels the subscription.

    March 11, 2024 at 9:04 am #27789
    admin
    Keymaster

    Try the following shortcode on a page:

    [swpm_stripe_subscription_cancel_link]

    Logged-in members should be able to click on the button created by this shortcode to cancel a Stripe subscription.

    This shortcode needs some improvements (it is on our wishlist to improve it). We are somewhat overwhelmed at the moment with the various new PayPal API related changes/work. So the Stripe stuff will have to wait a while.

    March 11, 2024 at 5:02 pm #27795
    openartist
    Participant

    Hey there,
    Thanks, I just tested and have some notes:
    1) The button works but should only appear if a user has an active subscription, I put it within some shortcodes to hide from any user that doesn’t have that subscription level.
    2) This is the biggest issue: if a user clicks it they will be logged out and have their account made inactive. This basically reproduces the Delete Account link. Here’s the expected behavior: A user’s subscription is canceled (with either a confirmation message or a screen refresh that shows the state change), and they are reverted to whatever the “free” membership level is. Finally, they remain logged in and their account remains active.

    I might try and add this functionality in myself. Can you give me any insights into how this is handled within the code?

    I

    March 11, 2024 at 7:51 pm #27796
    openartist
    Participant

    I tried creating a plugin to resolve this but I’m getting a fatal error. If you have any spare time here’s the repo: https://github.com/openartist/swpm-cancel-stripe-subscription

    March 12, 2024 at 10:24 pm #27801
    openartist
    Participant

    In case you don’t mind taking a look, I’ve been trying to get a plugin to work that addresses this issue. It’s meant to cancel the subscription and downgrade the user to a free plan if available or make their account inactive if not: https://github.com/openartist/swpm-cancel-stripe-subscription

    I found a bug with you current button, if the user cancels their account is made inactive and they can’t actually log out.

    March 13, 2024 at 12:18 am #27802
    admin
    Keymaster

    The membership level’s duration configuration also needs to be factored in. If you are using the “No Expiry” until cancelled then it will deactivate the account as soon as cancelled. If you are using a duration expiry value then it shouldn’t deactivate the account immediately (at least that’s how it should work).

    What is your membership level’s current setup?

    The custom plugin you created looks good. Which line of code are you having issues with?

    March 13, 2024 at 3:57 pm #27804
    openartist
    Participant

    The issue I’m having is the plugin is causing a fatal error, I’m not sure why, could be a conflict with the original plugin, I also had to dig around the code to make sure I was getting the right Stripe hooks, there may be some that are incorrect, and then at the end I’m not properly making the account inactive.

    March 15, 2024 at 4:28 am #27813
    admin
    Keymaster

    Can you post the fatal error that are receiving?

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy