Renewal emails continue after membership cancelled

Hi Folks,

I could use some insight on something I’m missing.

Our team has inherited a site using s2Member Pro plugin: cattlemaps.com. It’s configured to use Stripe for payments. A free trial period is followed by a paid one-year membership. Memberships are configured to auto-renew after that first paid year.

Our desire is to send the member an [auto] renewal notice 30, 10,… days prior to the renewal date. We have this working, by following the configuration instructions for renewal email notices for Next Payment Time. From that article, we have implemented the code snippet in an mu-plugin:

add_filter('ws_plugin__s2member_options', function($options) {
    $options['pro_eot_reminder_email_on_npt_also'] = '1';
    return $options;
});

As a result, the renewal notices ARE now being sent, which is great. Now, to cancel the membership, we’ve implemented a Stripe Billing Cancellation form using this shortcode:

[s2Member-Pro-Stripe-Form cancel="1" desc="This will cancel your account. Are you sure?" unsub="0" captcha="0" /]

Sure enough, when the member uses this form to cancel their subscription, Stripe cancels the membership and no auto-renewal occurs within Stripe. However, the member continues to receive renewal email notifications from the plugin at the 30, 10,… day intervals leading up the [now] cancelled membership.

By the way, should this have anything to do with it, we do have a webhook registered with Stripe:

https://cattlemaps.com/?s2member_pro_stripe_notify=1

Q. What am I missing in order to have the renewal emails stop after a membership has been cancelled?

Thanks, anyone.

In the webhook, did you include cancellations? In s2Member’s logs, do you see an entry about the cancellation? (if you didn’t have logging enabled, you can enable it, create a test subscription for 50 cents, and cancel it to check) WP Admin > s2Member Pro > Log Files

:slight_smile:

Thanks for your help, Cristián!

I confirmed that in Stripe, our webhook currently receives ‘all’ Stripe events. So, that should be fine. Also, I’ve had the s2Member log files enabled for a while. I found that I do have an entry reported by the Stripe webhook for when I cancelled my [test] membership. So, the s2Member plugin appears to be getting notified by Stripe when the cancellation is performed.

Hmm, not sure where to go from here. I think our last resort is just to add some verbiage to the renewal email telling the member to disregard this notice if they’ve already cancelled their membership.

I suppose at this point, I may file a bug report.

Again, thanks for your help!

Thanks for the udpate!

found that I do have an entry reported by the Stripe webhook for when I cancelled my [test] membership. So, the s2Member plugin appears to be getting notified by Stripe when the cancellation is performed.

Okay, what does that entry say? Does it mention setting an EOT time for the user? Did the user get an EOT time set in the profile?

:slight_smile:

Thanks for the help, Cristián, and apologies for my late reply.

It turns out that our client is content to just letting the member know in the renewal email that they can disregard the notice if they’ve already cancelled their membership. They don’t wish for me to pursue this issue any longer.

I very much appreciate your quick assistance with this! And, apologize for not taking this further with your suggestions to examine the EOT settings, etc…

1 Like

Thanks for the update!

That sounds like a perfectly acceptable solution to me. I’m glad they made it simple for you.

:slight_smile: