Add Billing Method Does Not Appear

We have been using s2Member pro with Stripe for some years, but recently migrated to a new host with the newest PHP version. Now, the “Add Billing Method” doesn’t work at https://whav.net/news-match-premium-monthly-subscription/ and similar pages. I’ve seen other report the issue on these pages, but I have not seen a solution mentioned.

The Firefox console shows an error: "Loading failed for the with source “https://whav.net/wp-content/plugins/s2member/s2member-o.php?ws_plugin__s2member_js_w_globals=b1962dfb881f6858edb859aa3ad1bd76&qcABC=1&ver=170722-170722-1329893128”."

Any help or suggestions is appreciated.

Hi Tim.

When I tried loading that file, I get this message: “ERROR: s2Member unable to locate WordPress directory.”

Could you tell me about your WordPress installation? Did you use a simple default or did you customize the directories a bit?

I look forward to your reply :slight_smile:

Thank you for your response. The entire site was recently migrated to a new host via a migrate plugin. Maybe the directory structure changed during the move. I can try to check. Maybe S2Member reinstallation would fix?

I don’t think that reinstalling s2Member would fix that, but you can try it.

Let me know when you find out if the WP directories were changed in some way. Perhaps it was done in such a way that s2Member can’t find it for some reason.

I look forward to your update. :slight_smile:

This is kind of a technical solution, but you can also try setting a server variable to tell s2Member where WordPress is, if your host allows that.

I faced a similar issue with the trellis stack. The solution will be different depending on your host and web server, but setting a WP_DIR server variable will help s2Member find your WP installation.

@clavaque I think I also experienced the issue when I tried using a “WP-optimized host” a few years back. Maybe it was Flywheel? It was a while back so it might have been a different host or fixed by now.

I’m wondering if more and more hosts that offer automatic updates, etc. are sharing the same WP core installation for ease of updates and to save some storage space and CPU when upgrades occur.

Unfortunately, s2Member has been the only plugin I’ve experienced that can’t find WP core sometimes. Maybe a rewrite of how it locates it? :slight_smile:

1 Like

Thanks Ric. I added it to my list of things to look into. :slight_smile:

Using FTP, I can confirm the path exists (https://whav.net/wp-content/plugins/s2member/s2member-o.php?) all the way to the php file. Since Flywheel was mentioned, that actually
is the host we recently migrated to.