Modify Stripe pro form fields - state/province

Hi there,
I’m using s2mPro, and facing an issue i can’t seem to fix yet, i’d need your help!
I’m using stripe pro forms, ( modify, upgrade/downgrade) .

Among the mandatory fields used for the billing adress (street/ city/ postal code/ state/ country) there is “state-province” that is only appliable for the US. For the country i work with, this field is irrelevant, i wanted to remove it then i used process described on, to test if it could work without it (i used stripe-checkout-form.php in my theme).

Of course theres a checking for mandatory fields not to stay blank…

I’ve seen a discussion with a canadian user that was talking about this very same field, but it was back in 2018/19, you answered it was part of Stripe requirements.
I’d like to know :
1 if theres any news about it, as i cannot use these forms with this field showing up
2 where can i disable the code verifying this field in s2m, so i can hide it and send it blank to stripe without users to worry about it
3 if there is another solution, i’m listening!!

Thanks for reading!

I checked, stripe does allow payment even if these fields are “null” value. I won’t use tax system as it is way too complex to adapt it as i have a constant rate that can be displayed other ways.

I’m considering using custom fields instead, but… theres a rule that applies in the regular process: Custom “Fields will NOT be displayed to existing Users/Members that are already logged-in”

is it possible to change that?
as it is not ideal to ask for these informations before getting in this pro-form
it was the subjec for the post below :

Hi Capucine,

I see what you mean. Yeah, the pro-form for a logged in user is just for payment, won’t show the profile fields, those are only during registration. To modify the profile afterwards, [s2Member-Profile /] is used. Wp Admin > s2Member > General Options > Member Profile Modification

But I can understand the situation you’re describing, too…

I guess there could be shortcode attributes that let you show profile fields to an existing user in the payment pro-form. Maybe profile="yes" or something more specific, like profile_fields="address,country,terms".

This is not something I’d work on adding immediately, but you’re of course free to customize your installation as you want. Maybe adding them in a custom pro-form template as you mentioned.

Then add the processing for them customizing the pro-form handler. s2member-pro/src/includes/classes/gateways/stripe/

In that file you’ll find four blocks, depending on whether it’s a new or existing user, and if it’s a subscription or buy-now payment. You could try adding the custom profile fields handling to the existing user ones.

You can look at the s2Member-Profile code to see how updating the fields would work… These files if I’m not mistaken: s2member/src/includes/classes/ and

You’ll need to keep a backup copy of your customized file to re-apply it, because it’ll be overwritten with new s2Member Pro updates.


Many thanks for your reply i ll look into it !

1 Like