EOT Renewal Notifications not being sent

We use S2Pro and have had the EOT notification setup for 2 years with -30, -10, -5, -1 setup and working.
This year the -30 notifications went out, no issues.
The -10 notifications, did not go.
The -5 notifications went out last night but to only 34 out of 90+ members.

I have had a look at the EOT log file which identified the 34, here’s a sample of one (I have changed personal data with xxxxxx to protect the member).

Any ideas what the issue could be?

LOG ENTRY: Thu Sep 24th, 2020 @ precisely 3:48 am UTC
PHP v7.3.22 :: WordPress v5.5.1 :: s2Member v200301 :: s2Member Pro v200301
Memory 16.31 MB :: Real Memory 18.00 MB :: Peak Memory 17.35 MB :: Real Peak Memory 20.00 MB
www.theappliqueguildofaustralia.org.au/wp-cron.php?doing_wp_cron=1600919278.2759408950805664062500
User-Agent: WordPress/5.5.1; https://www.theappliqueguildofaustralia.org.au
Array
(
[eot] => Array
(
[type] => fixed
[time] => 1601424000
[tense] => future
[debug] => This is a fixed EOT time recorded by s2Member. It can be altered in the WordPress Dashboard for this user.
)

[eot_rfc822] => Wed, 30 Sep 20 00:00:00 +0000
[day] => -5
[now] => 1600919279
[user_id] => 467
[user_login] => xxxxx
[user_email] => xxxxxxx
[user_first_name] => xxxxxxx
[user_last_name] => xxxxxx
[mail_from] => "The Applique Guild of Australia" <enquiries@theappliqueguildofaustralia.org.au>
[recipient] => xxxxxxxx
[subject] => Renewal Reminder (Account Expires in about 5 days)
[message_clip] => Hi xxxxxxx!

Just a reminder that your account access will expire: September 30, 2020 10:00 am AEST …
)

Hi Branko.

This is something I’ve seen happen in rare cases with a large userbase, especially when combined with several reminders.

Here’s an article contributed by one of our users on this: http://aaronjerad.com/blog/fix-s2member-eot-reminder-emails-not-sent/

Also from him: Increase How Many Members are Scanned for EOT Reminders Per Process?

Please follow the tips there and let me know how it works for you.

I hope that helps! :slight_smile:

Thank you Cristian, long time no speak (email).

Can I say that I get the shivers when asked to change somebody else’s code particularly since I don’t code and php is a mystery. If the functions.php file is changed will that be overwritten next time there’s an S2 update.

P.S. Where is the functions.php file located.

True, long time no speak. It’s good to hear from you! I hope you’re doing fine in these crazy times…

The functions.php file goes in your theme’s directory. https://www.ostraining.com/blog/wordpress/functions-php/

I prefer using a must-use plugin, which is basically a PHP file with your code in this directory /wp-content/mu-plugins (create it if it’s not there yet) https://www.sitepoint.com/wordpress-mu-plugins/

The file can be named anything you want, e.g. s2-hacks.php. Start the file with <?php as the very first thing, and then add your code (e.g. the one from the article in my previous reply). This won’t be removed by updates.

Does that help? :slight_smile:

Thank you Cristian.
Yeah crazy times, we’re just heading out from a second lockdown.

I used the mu-plugin option as the theme already has a functions.php file which probably would have been replaced with the next update. The mu-plugin does show up in the Installed Plugins view. The Pre-process was processing 6 members per cycle. This I’ve now changed to 45 for now as there’s some 500 records to process.
I have also installed the WP Mail log plugin to see what’s going on.

What I’m looking for now is:

  • how do I know the mu-plugin is actually used, and
  • what is the cycle frequency and is it possible to manually trigger it to start.

I do appreciate your help with this matter and wonder whether this should be configurable within S2.

Cool.

You may want to take a look at this and try it, maybe it’s what you need: https://wordpress.org/plugins/wp-crontrol/

Let me know how it goes. :slight_smile:

I have installed WP Control last night and the only cron relating to EOT that I can find is ws_plugin__s2member_auto_eot_system__schedule which is scheduled to run every 10 minutes. I don’t believe that this job is the trigger to initiate the EOT notifications.
I have had a look at the WP Mail log plugin and there’s been no notifications in the last 24 hours event though the cron is supposed to be triggered at -5, -3, -1 intervals based on the EOT date of 30 September 2020, when the member renewal is due.

How does one trigger the notification cron to run right now because I need it to run through at least 1 complete cycle before the EOT expiry date. I’m happy to add -4 and -2 to the triggers. I have also now changed the Pre-processes to 60 so it would only need to run 3 cycles to pick up all members.

If you were to want to have a look at site I’m happy to give you access outside of the forum.

Hi Cristian,

Well, today it sent out all the remaining (un-financial) reminders using the -1 trigger, but there’s something that’s not just right. It appears that there’s somewhere behind the scenes settings that it is using and ignoring those from the PayPal EOT Renewal/Reminder options. I say that because it ignored the -4, -3, -2 triggers but the Pre-process scan’s were still taking place and from all appearances the scan completes each day.

The other strange thing happening is the email it sends out. This is the email that is sent:

while this is the message in the PayPal settings that should be used.

The email message sent appears to have wording consistent with the other default PayPal emails, but I can not find where the text for the email sent is stored.

Because S2 is getting the email message from somewhere else leads me to conclude that the scan triggers used are not those on the PayPal EOT Renewal/Reminder settings page. They must be stored somewhere else.
Can you help identify this?

That’s very strange… The EOT reminder emails are global, same for all payment gateways. It’s the same setting although shown in the options page of each gateway. I don’t know that there’s anything saved elsewhere, either.

Are you sure that’s not the message body for the reminder of another day in your configuration?

You could check your database for that text. This should be in the options table if I’m not mistaken.

Hi Cristian,

Yes strange. I have searched through wp-options, wp-usermeta and wp-postmeta and non of them revealed any secrets.

I have also trolled through every S2 configuration page and the only place that any email has reference to renewal reminders is at EOT Renewal/Reminders Message and as you see from my previous post, the settings and actual are not the same. I am 100% positive the message sent is not as per configuration.

As I have also previously posted the message generation in inconsistent with the Remind X days before EOT occurs. My settings were -30, -10, -5, -1 and the Per-process settings were monitored for the 4 triggers. I also made sure that the per-process setting was way higher than the number of members to try and ensure it actually complete the scan, which I confirmed via s2member_last_reminder_scan. The sending of notifications was like this, -30 notifications were sent, the -14 did not send one, the -5 sent 8. To increase my frustration I than added -4, -3, -2. None of them were sent. Then finally the -1 was triggered and all un-financial renewal notifications were sent, some 80+. All notifications that were sent were using the original S2 PayPal EOT renewal/reminder message. If the personal configuration notifications is not going to used then why give the ability to create it.

Having said all that, it still leads me to believe that there must be something else that is used as the EOT X days trigger and the message. The notification generator is not reading the settings on the PayPal EOT Renewal/Reminder Email(s) settings page but something else.

While this years renewal’s are now frustratingly over I need this issue resolved before next October comes about and greatly appreciate your advice.

Thanks for the additional info. Yes, I can understand the frustration…

I wonder if something is conflicting in your installation, causing this strange behavior.

There is a default EOT reminder message in s2member-pro/src/includes/syscon.inc.php, but it’s part of the original options when installing s2Member, not something what s2 would use afterwards.

Reviewing s2member-pro/src/includes/classes/reminders.inc.php I can see it loads s2’s options from the db. Since you can see the customized message in your EOT Reminders interface, it’s obvious that it’s stored in the db as it should. This is very odd…

Can you create a clean installation of WP for testing, and add some daily subscriptions (e.g. 50 cents per day with Stripe in test mode) to test this with daily reminders (e.g. -5, -4, -3, -2, -1, 0)?