Cancellation notification emails stopped after hosting migration

I’m hoping you can help me understand a behavior change with cancellation notifications.

Plugin: s2Member Pro (Stripe Pro-Forms)
Theme: Divi
Mailer: WP Mail SMTP (Microsoft 365/Outlook)
Mail log: WP Mail Logging enabled

What changed:

We’ve run s2Member Pro successfully for ~10 years.
Yesterday we migrated hosting to GoDaddy Web Hosting Ultimate (cPanel). The site is behind GoDaddy’s Website Security (Sucuri WAF).

After migration, cancellation notification emails stopped . Everything else still emails normally.

What still works:

  • Registration , New Member , Login details , and EOT/Deletion emails are all being sent and appear in WP Mail Logging (delivered by 365/Outlook).

Stripe events are received and processed: subscriptions are created and can be canceled; EOT demotes/deletes at end of term as expected.

What no longer works:

"(s2Member / API Notification Email) – Cancellation” email is not sent when a member cancels.

*Nothing shows in WP Mail Logging for the cancellation event (so it doesn’t look like a deliverability problem, it looks like it isn’t being generated).

How we reproduce:

  1. Create a test Level 2 subscription using an s2Member Stripe Pro-Form .
  2. As the test member, visit the cancellation page and submit the cancellation.
  3. We see the “ Billing termination confirmed ” message.
  4. In Stripe, the subscription shows Canceled immediately.
  5. Expected: s2Member sends the “API Notification Email – Cancellation” to the admin.
    *Actual: No cancellation email is sent and nothing is logged by WP Mail Logging.

Canonical/SSL state with new hosting (same as old hosting in case it matters)

After the migration we also addressed canonical mismatches:

Enforced HTTP → HTTPS and www → non-www redirects (AutoSSL + cPanel 301 redirect + WAF cache purge).

All protected pages now behave correctly, and these redirects are working.

Questions for you

  1. Under what conditions should s2Member send the “API Notification Email – Cancellation” ?
  • Does it send regardless of whether the “Cancellation Notification URLs” field is populated, similar to signup/registration/EOT emails?
  1. Is there anything in the cancellation flow that could be affected by a WAF/CDN or canonical redirect (e.g., a local loopback request, admin-ajax call, or referrer check)?

  2. Are there specific debug logs you’d like us to enable in s2Member → Log Files (Debug) to capture the cancellation event so we can send you the output?

  3. Is there a known issue with certain hosting/WAF configurations that would prevent s2Member from sending the cancellation notification email while other event emails still send?

Timeline

Last known cancellation email arrived around 11:30am ET on Monday (before migration).
Immediately after the migration , cancellations no longer produced the admin notification email.
Other s2Member emails (Registration/EOT/etc.) continued to work.

Thanks in advance for any guidance or known fixes. This is a huge problem for a subscription website as we need to be able to track when users X their service with us.

Thank you for your help.

Thanks for all those details.

" A Cancellation is triggered when you cancel a Customer’s Subscription through your Payment Gateway, or when a Customer cancels their own Subscription." WP Admin > s2Member > API / Notificaitons > Cancellation Notification

Is there anything in the cancellation flow that could be affected by a WAF/CDN or canonical redirect (e.g., a local loopback request, admin-ajax call, or referrer check)?

As long at the Stripe webhook reaches your s2Member endpoint with all the data, it shoudl be fine.

  • Are there specific debug logs you’d like us to enable in s2Member → Log Files (Debug) to capture the cancellation event so we can send you the output?

The Stripe and Core IPN logs.

Is there a known issue with certain hosting/WAF configurations that would prevent s2Member from sending the cancellation notification email while other event emails still send?

Not that I know.

Last known cancellation email arrived around 11:30am ET on Monday (before migration).
Immediately after the migration , cancellations no longer produced the admin notification email.
Other s2Member emails (Registration/EOT/etc.) continued to work.

The WP Mail is working, obviously. I suppose your Cancellation Notification is still configured and not blank.

My main suspicion would be the Stripe webhook or data not reaching s2Member, that’s why I’d like to see those logs.

:slight_smile:

GoDaddy is like the worst choice for hosting anything, go for a wordpress dedicated hosting or get a virtual server/root server. It’s been that way as long as I can remember.

3 Likes

I agree!

VPS + LEMP stack

I like https://www.linuxbabe.com/ubuntu/install-lemp-stack-ubuntu-22-04-server-desktop and other tutorials (I am not related at all with them, it’s just my base reference point when doing those things).

Also, remember that things like Google AdSense and Google Analytics are extremely heavy and you lose a LOT of points on performance scores, meaning you’ll rank lower on search engines (ironically) and have to bother with cookie rules.

If you don’t track what people do, you don’t need to ask for permission to do that.

Those are my two cents. Hopefully helpful ones. :innocent:

Since we’re talking about cancellations, can you add, on a future update, a protective mechanism that does NOT cancel a subscription if the “new” subscription that “collides” with an “existing” one has the same cus and sub id? Same problem happens with PayPal, by the way!

Stripe will sometimes send two or more IPNs per subscription, specially when we host with slow servers and the handshakes fail. I frequently saw new subscriptions triggering the anti duplicate mechanism of s2member. My personal solution was to neuter the entire cancellation routine and this is the main reason I didn’t update my plugin yet. :grimacing:

DItto, running your own root server is the only way to go. There is nothing beyond my view and control.

I’ve been troubleshooting this with Jeff, so I’ll add a quick update here in case someone finds it while trying to solve something similar…

There were a few things: The domain changed from using the www to not having it, causing webhooks to be ignored. Others were ignored because of “missing POST vars”, but actually also because of the www mixup. And some users were missing signup vars from using a coupon on signup, causing more webhooks to be skipped…

In the end we could solve it updating the Pro addon to the latest to fix the coupons thing, using the fallback for the missing signup vars, and skipping the domain check because of the the www change.

I also had to fix a value in the fallback vars, and add the domain skip check in one more place. Those improvements will be in the next release.

:slight_smile:

1 Like

:slight_smile:

1 Like

Just asking about this - if you have two websites with one Stripe account, what will happen if you copy over an account from Website A to Website B with the domain check deactivated:
a) Stripe will send the subscription/payment/cancellation notice to both websites
b) Only the website A where the user was created will be notified

Will this behave the same way for paypal too?

1 Like

If the cus_ and sub_ codes match and if Stripe sends an IPN, it should be processed by s2member without caring about the source of the subscription, being that another site or manual.

Same with PayPal, but PayPal routines on s2member only validate the sub ID not the customer’s (they’re usually the same)

But is the ipn sent to each site? Or just to one? I guess ipn is sent to every site where you use the same account right? But then otherwise how does this work because it’s sent only once and that would create two notices of receiving but it’s only one.

1 Like

I remember that, for PayPal, you have to send the IPN to ONE site. I don’t know if it’s possible to send the IPN to multiple ones without using a third party solution.

It’s possible Stripe also only allows for one, but maybe it’s configurable?

That’s not dependent on s2member, though. I think I read somewhere, years ago, you can send those IPNs to an intermediary server and that server, then, forwards to multiple sites, if you have multiple ones.

Maybe there’s even a topic in this forum talking about it.

What I know that works is if you create a subscription manually, for example, and you already have the IPN set up to your site, s2member processes those notifications if the domain validation is turned off. This is an essential feature for situations where you create subscriptions manually or if you use, for example, PayPal links/buttons not via s2member.

Yeah I think it’s not sent to two sites and while I know how to redirect I don’t know how to duplicate with nginx

1 Like

I don’t either. I think the solution was to have a dedicated redirector for your IPN, so you’d send the IPN there, then you’d have that “service” forward it.

I believe you can work something out if you need that. I don’t know how to do it, sorry. :cry:

Stripe lets you create webhooks to different endpoints.

PayPal only lets you enter one, though. s2Member tries to set an IPN address for each transaction, but the PayPal default in the options is only one. And I don’t know a way to update the IPN URL for existing subscriptions. Maybe via API?

You can create a PHP script to forward the PayPal IPNs to the different sites, using s2’s custom domain value to recognize them. I’ve created some of these for clients in the past, and it works fine. In your s2Member Pro Extras zip file, you can find a sample script for this. https://s2member.com/account/

:slight_smile:

1 Like