I tried deactivating s2member with safeguards off - but it does not fully reset s2member as it seems to me.
I am very positive the bugs I have with Stripe subscriptions not demoting and success code not working are related to some garbage in the s2member tables.
NOTE - I do not want to reset any user meta data.
NOTE2 - the problematic data is not exported. If I export s2member settings - and put them to my testsite (testsite runs same theme, same mu-plugins, and imported s2member settings) - the problems seem to not occur. Nginx is also not at fault - because I setup the testsite at a subdomain - so same rules apply.
If I switch to the broken database (just change to via wp-options.php file and change the url beforehand) - the problems start.
So somewhere in the database there is garbage that s2member is choking on. What can I do to solve this?
Do I have to go kinda brute-force, and export wp-usermeta, wp-user wp posts and wp pages tables and import them into a clean database?
I’m 99.99% positive no other plugin settings are related (I did not duplicate all other plugin settings - as that would be a bit too much work. But disabling the plugins on the broken site, disabling the them, disabling mu-plugins - all does not help.