S2member-pro breaking website with PHP 8

Yes - here again what to delete for everyone:

  	'pro_clickbank_username'                  => '', 'pro_clickbank_clerk_key' => '', 'pro_clickbank_developer_key' => '', 'pro_clickbank_secret_key' => '', 'pro_clickbank_return_template_header' => sprintf(_x('<div><small style="font-size:70%;">ClickBank is the retailer of products on this site. CLICKBANK® is a registered trademark of Click Sales, Inc., a Delaware corporation located at 917 S. Lusk Street, Suite 200, Boise Idaho, 83706, USA and used by permission. ClickBank\'s role as retailer does not constitute an endorsement, approval or review of these products or any claim, statement or opinion used in promotion of these products.</small></div><p>%1$s <strong><em>says&hellip;</em></strong></p>', 's2member-front', 's2member'), esc_html($_SERVER['HTTP_HOST'])),
1 Like

I just upgraded to PHP8 and this error still exists and still breaks the site. The crazy thing is, it’s caused by one line that includes some totally unnecessary inline CSS: style=“font-size:70%;”

All that needs to be done is for the developer to remove the inline style. Bingo, now your plugin works with PHP8!

Again, the line of code is here: /plugins/s2member-pro/src/includes/syscon.inc.php on line 137

1 Like

Looks like my comment was too hasty. While my initial fixed resolved the site immediately crashing, I found another fatal error on my Stripe checkout page. So I guess we all need to continue to wait for the developer to make S2 fully compatible with PHP8. Here is the new error:
PHP Fatal error: Uncaught Error: Undefined constant “s2member_pro_stripe_checkout” in /wp-content/plugins/s2member/src/includes/classes/utilities.inc.php(49)

This error does not appear on PHP7.4

Just jumping on to say I just experienced this too. Used a VPS install script that set up PHP8. Manually downgraded to 7.4 and no errors. 7.4’s security support runs out in November so hoping this is fixed soon.

For me stripe Pro Form works fine on PHP 8.1

I was using Stripe Pro forms, but on 8.0 because that what was on the VPS install stack I was using. I’ll try 8.1 to see if it’s resolved there, but I can’t promise when :slight_smile:

I also used 8.0 without problems. Plan to update to 8.2 soon

well great the latest version finally fixed it. Didn’t look into the fix but guess it’s just the line removed.

@openmtbmap I’ve upgraded, but haven’t tried it yet. Wondering if there’s still a concern with object caching before I try to upgrade my server stack for s2 again.

Object caching always caused me plenty of problems. Not worth bothering with it.

1 Like