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

[Resolved] 4.6.6 Update Broke Stripe Subscription Button (Short code)

Simple Membership Plugin › Forums › Simple Membership Plugin › 4.6.6 Update Broke Stripe Subscription Button (Short code)

Tagged: Stripe bug

  • This topic has 6 replies, 3 voices, and was last updated 1 month, 3 weeks ago by admin.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • August 26, 2025 at 5:05 pm #31345
    astro
    Participant

    Hello, I upgraded the plugin today and my Stripe subscription button stopped working. It is throwing this error when I check in the Inspector on browser.

    membership-join/:632 Uncaught (in promise) TypeError: Cannot read properties of null (reading ‘setAttribute’)
    at HTMLFormElement.<anonymous> (membership-join/:632:30)

    August 27, 2025 at 1:18 am #31365
    The Assurer
    Moderator

    Thanks for sharing the error details. The message

    Uncaught (in promise) TypeError: Cannot read properties of null (reading ‘setAttribute’)

    suggests that the Stripe subscription button script is trying to find a form element but is not able to (it returns null). This usually happens after an update if:

    1. The Stripe subscription shortcode/button HTML is being altered by your theme or a page builder (extra wrappers, missing IDs, or stripped attributes).
      → Please double-check the page in the WordPress editor to make sure only the shortcode is there and that no hidden pre or <div> tags are wrapping it.
    2. Theme or plugin conflict is interfering with Stripe’s JavaScript.
      → The plugin team has seen this with some themes (e.g. Divi’s Defer jQuery option breaks the Stripe button). If you are using Divi, disable Defer jQuery under performance settings.
      → If not using Divi, the same issue may still happen if another optimization/caching plugin is deferring or combining scripts.
    3. Cache/minification is preventing the Stripe script from attaching to the form.
      → Try excluding the Stripe-related scripts from minification/caching.
      → Or temporarily disable your cache/optimization plugin and test again.
    4. Webhook or configuration mismatch is not usually the cause of a JavaScript error, but if you recently changed your setup, it’s still worth verifying that your Stripe webhook is correctly configured.

    ✅ What to try first:

    • Inspect the HTML on the membership join page and see if the subscription form is present in the DOM. If it’s missing, your shortcode might be wrapped/stripped.
    • Temporarily switch to a default theme (like Twenty Twenty-Five) with only Simple Membership active. If the button works there, then it’s a conflict with your theme or another plugin.
    • If you are using Divi, disable Defer jQuery.

    👉 Could you also share:
    The shortcode you’re using for the Stripe subscription button.

    • This reply was modified 2 months ago by The Assurer.
    • This reply was modified 2 months ago by The Assurer.
    • This reply was modified 2 months ago by The Assurer.
    • This reply was modified 2 months ago by The Assurer.
    August 27, 2025 at 6:31 am #31375
    admin
    Keymaster

    Also, please share the URL where the subscription button is so we can inspect it using our browser and check if there are any JavaScript errors on that page:
    https://simple-membership-plugin.com/javascript-errors-on-your-site/

    August 28, 2025 at 3:20 am #31409
    astro
    Participant

    Hello, thank you for the quick response.
    1. I created an empty page with block editor and only added the shortcode to it, didn’t work. Still throwing same error in the console.
    2. The theme I am using is Astra (free)
    3. I temporarily disabled my cache plugin (LiteSpeed Cache), didn’t make any difference. I am not using any minification on my site
    4. I have not changed any settings, I simply updated the plugin yesterday and the Stripe button stopped working since.
    5. I created a new Stripe subscription button but it didn’t work either. I then tried creating the depricated stripe button and it worked fine, however the depricated one didn’t have the Google Pay/Apple Pay feature so I deleted it.

    My shortcode (which stopped working) is: [swpm_payment_button id=”4533″ class=”my-stripe-button”]

    Since my website is already in production and I don’t want to risk losing users, I have completely removed the Stripe subscription button and just left the Paypal subcription button for now which works fine.

    My question is, is it possible to downgrade the plugin to previous version where my stripe button did work? If I manually upload the previous version whilst the current 4.6.6 is installed and activated, will that delete my data (api keys and all the settings)?

    I don’t want to temper with my site theme and all because I have spent months setting everything up and I don’t want anything else to break therefore I am thinking to downgrade the plugin to previous version until this issue is fixed 🙁

    August 28, 2025 at 3:48 am #31413
    admin
    Keymaster

    Unless I can check the actual URL of the page containing the button, I can’t confirm 100% whether there’s a JavaScript error. Based on what you’ve described, it does sound like there may be an error.

    You can safely downgrade the plugin if you wish—doing so won’t cause any data loss:
    https://downloads.wordpress.org/plugin/simple-membership.4.6.5.zip

    That said, we generally don’t recommend downgrading because the JavaScript issue isn’t originating from our plugin. It’s better to resolve the root cause of the error so that you can continue using the latest versions.

    As an alternative (if you can’t address the theme’s JavaScript errors right now), you could use the following Stripe Payments plugin for membership payments:
    https://wordpress.org/plugins/stripe-payments/

    We also have integration documentation here:
    https://simple-membership-plugin.com/stripe-payments-plugin-integration-for-membership-payment/

    August 31, 2025 at 3:12 pm #31427
    astro
    Participant

    Sorry for the late reply, was OOTO. I just installed the new update 4.6.7. It seems like the issue has now been resolved. The stripe subscription button started working again, thank you.

    August 31, 2025 at 11:53 pm #31428
    admin
    Keymaster

    Good to hear that.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 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 © 2025 | Simple Membership Plugin | Privacy Policy