Stripe ProForm PHP Fatal Error recently

Hi there
I use the Stripe ProForms and everthing worked as expected until recently.

The WP debug log tells me:
[26-Apr-2020 10:30:50 UTC] PHP Fatal error: Uncaught Error: Object of class WP_Post could not be converted to string in /public/NOTRELEVANT/wp-content/plugins/s2member/src/includes/classes/utils-strings.inc.php:235
Stack trace:
#0 /public/NOTRELEVANT/wp-content/plugins/s2member/src/includes/classes/utils-strings.inc.php(232): c_ws_plugin__s2member_utils_strings::trim_deep(Object(WP_Post), ’ \t\n\r\x00\v’)
#1 /public/NOTRELEVANT/wp-content/plugins/s2member-pro/src/includes/classes/gateways/stripe/stripe-form-in.inc.php(546): c_ws_plugin__s2member_utils_strings::trim_deep(Array)
#2 /public/NOTRELEVANT/wp-content/plugins/s2member-pro/src/includes/classes/gateways/stripe/stripe-form.inc.php(63): c_ws_plugin__s2member_pro_stripe_form_in::sc_stripe_form(Array, ‘’, ‘s2Member-Pro-St…’)
#3 /public/NOTRELEVANT/wp-includes/shortcodes.php(343): c_ws_plugin__s2member_pro_stripe_form::sc_stripe_form(Array, ‘’, ‘s2Member-Pro-St…’)
#4 [internal function]: do_shortcode_tag(Array)
#5 /public/NOTRELEVANT/wp-includes/shortcodes.php(218): preg_replace_callback(’/\[(\ in /public/NOTRELEVANT/wp-content/plugins/s2member/src/includes/classes/utils-strings.inc.php on line 235

Can somebody help me please?

Thank you so much! Best
Rachid

Show us your pro form. The code doesn’t like something in it.

Hi Tim

Thank you so much for your help and fast reply. Here is one site where I have the Stripe ProForm online: https://www.fit-body.ch/preis-gym

I used the following shortcode in the backend:

[s2Member-Pro-Stripe-Form level=“2” ccaps=“gym” desc=“GOLD MEMBER GYM - 29.90 CHF / Monat (wiederkehrend abgerechnet, jederzeit kündbar)” cc=“CHF” custom=“www.fit-body.ch” ta=“0” tp=“0” tt=“D” ra=“29.90” rp=“1” rt=“M” rr=“1” coupon="" accept_coupons=“0” default_country_code=“US” captcha=“0” /]

You are using smart quotes. in most of these. I don’t think s2member likes smart quotes. Use straight quotes. See https://practicaltypography.com/straight-and-curly-quotes.html

Example: The difference is subtle

“0” (Smart)
“0” (Straight)

@clavaque - FYI…Pro Form might be having a problem with smart quotes.

Thank you for your reply. Hmmm… I just installed a plugin which should prevent from using anything else than straight quotes but it looks like it does not work. Do you think this is really a copy/paste or quote-type issue? I am asking because I have this issue only since recently.

New code which does not work too:
[s2Member-Pro-Stripe-Form level=“2” ccaps=“gym” desc=“GOLD MEMBER GYM - 29.90 CHF / Monat (wiederkehrend abgerechnet, jederzeit kündbar)” cc=“CHF” custom=“www.fit-body.ch” ta=“0” tp=“0” tt=“D” ra=“29.90” rp=“1” rt=“M” rr=“1” coupon="" accept_coupons=“0” default_country_code=“US” captcha=“0” /]

Not sure why you are using a plugin related to quotes. Just edit the file manually. Just manually convert them to single quotes.

I know what you mean Tim. The issue is: Whatever I do it always makes smart quotes in Google Chrome when I add quotation marks. Whether or not I use text/visual mode…

Even if i use the ALT combination ALT + 34

I’m slowly losing my mind :smiley:

Is it converting single quotes?

Tim I tried so many things and this leads me to the conclusion this issue is not typography based. I even disabled wordpress formating options through the theme functions.php with these options:

remove_filter(‘the_content’, ‘wptexturize’);
remove_filter(‘comment_text’, ‘wptexturize’);
remove_filter (‘single_post_title’, ‘wptexturize’);
remove_filter (‘the_title’, ‘wptexturize’);
remove_filter (‘wp_title’, ‘wptexturize’);

It is hard to find out if it does converting single quotes. I believe no but here is an example of a complete setup using two single quotes instead of doubled ones. Same issue: I get an internal server error:
[s2Member-Pro-Stripe-Form level=’‘2’’ ccaps=’‘gym’’ desc=’‘GOLD MEMBER GYM - 29.90 CHF / Monat (wiederkehrend abgerechnet, jederzeit kündbar)’’ cc=’‘CHF’’ custom=’‘www.fit-body.ch’’ ta=’‘0’’ tp=’‘0’’ tt=’‘D’’ ra=’‘29.90’’ rp=’‘1’’ rt=’‘M’’ rr=’‘1’’ coupon=’’’’ accept_coupons=’‘0’’ default_country_code=’‘US’’ captcha=’‘0’’ /]

Looks like WP converts single quotes as well. https://www.webnots.com/4-ways-to-disable-smart-or-curly-quotes-in-wordpress/

Try getting rid of the ()/ characters from the description.

Next step is to add an element at a time until it breaks.

[s2Member-Pro-Stripe-Form level=’‘2’’ /]

[s2Member-Pro-Stripe-Form level=’‘2’’ ccaps=’‘gym’’ /]

[s2Member-Pro-Stripe-Form level=’‘2’’ ccaps=’‘gym’’ desc=’‘GOLD MEMBER GYM - 29.90 CHF / Monat (wiederkehrend abgerechnet, jederzeit kündbar)’’ /]

etc

Good idea! But the problem also starts with [s2Member-Pro-Stripe-Form level=“2” /].

Even if i just use the text editor and use the HTML code for doubled quotation marks ("). The strange thing is that this worked the last time I checked the forms/pages (unfortunately I do not remember when but roughly a few days ago).

Maybe it is the Avada theme? I use “Fusion Builder” within my websites on top of the Avada theme (which is suggested) and it does not count if I use Fusion Builder or just a blank WordPress page and use this in the text editor: [s2Member-Pro-Stripe-Form level="3" /]

So strange…

Now I have to go to sleep a little, because here in Switzerland it is almost half past two in the night. I will read your answer a few hours later. Thank you so much for your time Tim! I really appreciate it!

You said “it worked until recently”. If you can remember if you added a plugin, what plugin was added between the time it worked and the time it stopped working.

1 Like

Good day Tim

Back with new energy I found out that the plugin “Tracking Code Manager” (Version 1.12.2 | from IntellyWP) caused the issue.

After I started to deactivate plugins sequentially and checked the page each time, everything worked fine without the plugin “Tracking Code Manager”.

So, there should be no issue with curled/smart quotes because I also deleted the changes in functions.php again. But honestly, your idea that the issue was caused by smart quotes made a lot sense!

THank you so much for your help and time, Tim! Whenever I can help you one day --> Please let me know.

Take care and best
Rachid

FYI: Alternative and working plugin to “Tracking Code Manager” is “Header and Footer Scripts” (Version 2.2.1 | from Digital Liberation).

With the plugin “Header and Footer Scripts” you can easily paste in specific tracking codes per single page/post.

The plugin “Header and Footer Scripts” works with s2Member Stripe pro forms.

Glad you got it sorted :slight_smile:

1 Like

A ProForm PHP related to STRIPE! _
It is definitely adding on my stripe PHP stuff as I’ve been surfing it through for the integration process. Finally got some really productive thread. Thanks a ton, mates! :slight_smile: