Duplicate Reminder Emails from Appointments+

Note: This is happening on multiple sites.

When the Appointments+ Reminders are sent, two (at the same time) are sent to the customer rather than one.

I checked the Appointments+ Log and the log only reports sending one.

However, clients have reported to me that they receive two at the same time.

I did my own testing and can replicate the issue.

The clients (and my test client) are guests and do not have usernames on the system.

I checked the reminder intervals and none of them are duplicated.

I was able to get it to only send one reminder email in a very specific case (which is not sustainable and appears to show a bug in the system). Here's the steps and results.

Step #1 - Create one service provider, one service and one location.
Step #2 - Enter a few values in 'Reminder email Sending Time for the Client (hours)'
Step #3 - Set the 'Send Reminder email to the Provider' value to No.
Step #4 - Create an appointment with no service provider with a time that will trigger the reminder email a few minutes after the appointment is created.
Step #5 - Wait for the emails to come (you should receive 2 to the email address in the appointment).
Step #6 - Set the 'Send Reminder email to the Provider' value to Yes.
Step #7 - Change the appointment time.
Step #8 - Add in another value in the 'Reminder email Sending Time for the Client (hours)' filed so that the reminder gets sent off in a few minutes.
Step #9 - Wait for the email (success! you should only receive 1 email to the email address in the appointment).
Step #10 - Change the service provider on the appointment to the service provider you created in Step #1.
Step #11 - Change the appointment time.
Step #12 - Add in another value in the 'Reminder email Sending Time for the Client (hours)'
Step #13 - Wait for the emails to come (you should receive 2 to the email address in the appointment).
Step #14 - Set the 'Send Reminder email to the Provider' value to No.
Step #15 - Change the appointment time.
Step #16 - Add in another value in the 'Reminder email Sending Time for the Client (hours)'
Step #17 - Wait for the emails to come (you should receive 2 to the email address in the appointment).
Step #18 - Set the 'Send Reminder email to the Provider' value to Yes.
Step #19 - Change the appointment time.
Step #20 - Add in another value in the 'Reminder email Sending Time for the Client (hours)'
Step #21 - Wait for the emails to come (you should receive 2 to the email address in the appointment).
Step #22- Change the service provider on the appointment to 'no specific provider'.
Step #23 - Change the appointment time.
Step #24 - Add in another value in the 'Reminder email Sending Time for the Client (hours)' filed so that the reminder gets sent off in a few minutes.
Step #25 - Wait for the email (success! you should only receive 1 email to the email address in the appointment).

As you can see - the only time I received 1 email was when the service provider was set to 'no specific provider' and the notify provider was set to 'yes'.

This is nut a sustainable solution and cannot be implemented in my production environment.

  • Nithin

    Hi Chris,

    Hope you are doing good today. :slight_smile:

    I tried to replicate this but couldn't, maybe I'm missing something, could you please enable support access so that I could configure the settings exactly like yours, and give a closer look.

    You can grant access from WPMU DEV > Support > Support Access > Grant Access or see this manual.
    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Have a nice weekend. :slight_smile:

    Kind Regards,
    Nithin

  • Chris

    Hi Nithin,

    It's against company policy to enable any outside access.

    What I can tell you is that it's happened on multiple systems and to reduce the chance there was a configuration issue, I tested it on an almost new system and still had the issue.

    Here are the states of the Appointments + Add-ons...

    Administrative Permissions………..................Not Active
    Export Date Range.............................................Not Active
    Pending Appointments count notification..........Not Active
    Allow HTML emails…………..............................Active
    Locations...........................................................Active
    Locations on Google Maps………...................Not Active
    Service Locations..............................................Active
    Worker Locations..............................................Active
    Appointments in product cart...........................Not Active
    Biography post type………….............................Not Active
    Service Description post type............................Not Active
    Service provider names.....................................Not Active
    Default Service………....………........................Active
    Durations..........................................................Active
    Paddings...........................................................Not Active
    Shared Resources……………..…...................Active
    Show Scheduled Users………........................Not Active
    Tetris Mode.....................................................Not Active
    AJAX shortcode..............................................Not Active
    Additional fields..............................................Not Active
    Limit Services Login.........................................Not Active

    I noticed something very strange...

    The 'duplicate' emails were not completely the same.

    When I had 'No Specific Provider' selected, the SERVICE_PROVIDER variable was replaced with 'Our staff' in one email and 'A specialist' in another email.

    So, I dug deeper...

    I disabled all add-ons except 'Default Service' - no luck.
    I disabled the 'Default Service' add-on - no luck.
    I looked through the appointments.php file for 'specialist' and found it in one piece of code.
    + There were notes right above that code about only using something for unit testing.
    + The other was a function directly above the code I found ('function get_worker_name') that said it was depreciated.
    ++ I commented out the depreciated function and tested - it worked!
    I then re-enabled the necessary add-ons and retested - it worked!
    I then changed the service provider to a user instead of 'our staff' - it failed (I received two reminder notifications.)
    I then implemented the fix on another server and it worked (even when the service provider was an actual person and not just 'our staff.)
    I then went back to the environment where it wasn't working, commented out another depreciated function 'public function is_worker', re-tested and it worked once.
    I tested it again in the environment where it wasn't working again while changing nothing but the appointment time and it failed (I received two emails).

    I hope this gives you enough information to take to the developers and have them implement a permanent fix.

    Kind Regards,
    Chris

  • Kasia Swiderska

    Hello Chris,

    I'm extremely sorry for the delay on our end. I've run test twice and my results are: I'm getting reminder twice with 10 minutes delay. So when I set reminder 1h before the meeting I'm getting one reminder 1 hour before and second one 10 minutes after first one.
    So look like I'm able to replicate - however I'm not sure if you also have that 10 minute delay. Is it also case for you?

    Of course I'm sending bug report because two mails with reminder is not what should happen here.

    kind regards,
    Kasia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.