Email notification of booked appointments with custom content needed to multiple email addresses

Hi everyone... I need some help please

I have several staff that need to be notified of new appointments made online

The information each staff need is:
Person's name for appointment:
Telephone No:
Email address:
Appointment type booked:
Practitioner they booked:
Appointment date/time book:

We need multiple email addresses to be notified immediately (not 12/24hrs like default options) when the appointment is made?

Any help with code etc.. would be much appreciated..

Thanks, Robbie

  • Michelle Shull

    Hi there, Robbie!

    I'm happy to add a feature request to extend Appointments+, but if this is critical, it may be worth hiring an indie dev, like from our Jobs Board, to work with you here.

    We can do quite a bit of this, however. With the additional fields addon, you can add as much as you need to the appointment setting form, which will then be sent with notification emails. (Appointments + > Settings > Add Ons)

    You can send notifications, now, without any additions, to the client, the service provider, and the admin, with some restrictions. To send to the service provider, they must be allowed to confirm their own appointments. Sending to the admin will be done via payment gateway if you charge for appointments, if they're free you can have them sent to the admin(s) automatically, as well.

    If you've added additional custom fields, these should be included in the confirmation email as well.

    Hope this helps, Robbie!

  • Ash

    Hello @Robbie

    I hope you are well today.

    Do you have multiple service providers? Then reminder emails are sent to that provider's email address.

    Also note that, the reminder emails are sent based on wp cron, so you will need some regular visitors in your site.

    If you want to send all reminder emails to another email, please use the following code:

    add_action( 'app_notification_sent', 'app_notification_sent_cb', 99, 3 );
    function app_notification_sent_cb( $body, $r, $app_id ) {
        $email = 'YOUR EMAIL ADDRESS';
        $subject = 'NEW SUBJECT';
        $body = 'YOUR EMAIL CONTENT';
        wp_mail( $email, $subject, $body );
    }

    Here, $body is pre0defined email content, $r is appointment object and $app_id is appointment id.

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.