Support forumCategory: QuestionsReminder texts are not sending
H asked 4 months ago

I’ve been trying to deploy the “reminder texts” functionality and have not been able to get it to work.  Confirmation and cancellation texts work fine, but no reminder texts get sent.  I’ve been trying to figure this out for a couple of days now.  I thought it was a cron issue, but I’ve tried wp-cron in WordPress, disabling wp-cron and using the website cron to run wp-cron, enabling wp-cron while also using the website cron.  I’ve tried 2 hr reminder, 4 hr reminder, 5 hr reminder, 6 hr reminder.  Nothing happens.  I’ve tried using the php method to run it in cron and the wget method.  I’ve tried 15 minute intervals and 20 minute intervals (our provider does not allow less than 15 minute intervals).  This is frustrating as it was a key feature we wanted, and now we might need a refund.
We are on Easy Appointments 2.4.3 with Easy Appointments Connect 0.10.5 on HostGator running WordPress 5.2.1 and PHP 7.1.  Using WP Crontrol, I can see the eac_twilio_sync() queued up in wp-cron and can even run it maually, but still no reminder texts.
HostGator’s shared platform does not allow us to change the server timezone of Central time (Chicago) but our WordPress is configured to offset to Eastern time (New York) but I see in wp_ea_twilio_reminder that you might be doing everything in Universal time anyway.  HostGator also does not allow us to update the default version of PHP running on the server (5.4) but allows us to set a different version to run on specific directories (7.1).  There are no errors in Twilio, and all the “reminder” entries in wp_ea_twilio_reminder are still null, so I think twilio_sync is getting no results from get_app_ids().
Any ideas on what to do or  try?

3 Answers
Nikola Loncar Staff answered 4 months ago

Hi,
can you please check in database if there is a column named reminder in table <wp_prefix>ea_twilio_reminder?
Best regards,
Nikola

H replied 4 months ago

Yes, the column exists and all values are ‘null’.

Nikola Loncar Staff answered 4 months ago

Can you please open this file inside plugins folder: easy-appointments-connect/src/cron/twilio_cron.php

and change line 88 from:

t.reminder IS NOT NULL”;

to

t.reminder IS NULL”;

This should solve the issue. This was added in last version.

Best regards,
Nikola

Nikola Loncar Staff replied 4 months ago

Keep in mind that you will have to wait until cron job run one more time until you can see if this is working or not.

Best regards,
Nikola

Nikola Loncar Staff answered 4 months ago

Hmmm this last suggest will not solve the issue. There will be new version with that bug fix in next 24h.

Best regards,
Nikola

H replied 4 months ago

Yes, after testing out the suggestion, setting it to “t.reminder is NULL” starts reminder texts to appointments that are “pending” but not to appointments already “confirmed,” because of the “IS NULL” in line 87. If I also change line 87 to “t.id IS NOT NULL AND”, then it no longer sends reminder text to “pending” appointments (good) and sends reminder texts to “confirmed” appointments (also good), but the “reminder” field does not get set in this case and remains “null.” As a result, the reminder texts for the “confirmed” appointments are sent out repeatedly every time the cron job is run (very bad).

H replied 4 months ago

Also, I just checked the scenario where I have a “confirmed” appointment and then “canceled” it. Because the “canceled” appointment’s entry is still in ea_twilio_reminder and with a null “reminder” flag, it still gets send a reminder text even though it’s a canceled appointment.

H replied 4 months ago

^ That scenario is with line 87 changed to “is NOT NULL”, that is.