Bug on Stripe update card - impossible to update credit card

Rollowing notice is shown to a customer after entering the credit card I assume:

Fatal error: Uncaught Error: Non-static method c_ws_plugin__s2member_pro_stripe_utilities::subscr_remove_default_card() cannot be called statically
in /var/www/openmtbmap.org/htdocs/wp-content/plugins/s2member-pro/src/includes/classes/gateways/stripe/stripe-update-in.inc.php on line 102

Call stack:

c_ws_plugin__s2member_pro_stripe_update_in::stripe_update()
wp-content/plugins/s2member-pro/src/includes/classes/gateways/stripe/stripe-update.inc.php:58
c_ws_plugin__s2member_pro_stripe_update::stripe_update()
wp-includes/class-wp-hook.php:308
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:332
WP_Hook::do_action()
wp-includes/plugin.php:517
do_action()
wp-settings.php:623
require_once()
/var/www/openmtbmap.org/wp-config.php:115
require_once()
wp-load.php:55
require_once()
wp-blog-header.php:13
require()
index.php:17
Query Monitor

well actually the card got updated - but not sure how this error notice showed up after confirming the form.

Thanks for reporting that, Felix.

Could you try this fix? In the file s2member-pro/src/includes/classes/gateways/stripe/stripe-utilities.inc.php, on line 1230, can you change this:

		function subscr_remove_default_card($subscr_id) {

to this?

		public static function subscr_remove_default_card($subscr_id) {

Then please try reproducing the error, and see if it went away.

:slight_smile:

Any word on whether this worked or not. Customer is reporting a “There has been a critical error” when trying update their card.

No I haven’t. I’m not sure it’s reproducible in Stripe testing mode. I guess need to setup a cheap (say 2 Cent) subscription and try it out yourself.
I have most of my customers on PayPal subscription not stripe

I can confirm that this code change works!

1 Like

I released this last week, but forgot to link to it. https://s2member.com/s2member-v230808-now-available/

:slight_smile: