Appointment+ Custom Email to Staff

Hello, is there a way we can customise the email being sent to the site administrator? At the moment, it only shows:

The new appointment has an ID 17 and you can edit it clicking this link: http://sampledomain.com/wp-admin/admin.php?page=appointments&type=pending

I would like to show more details like this:

Someone Is Interested In Comany Sample - Larchmont (Subject)
Name: Katie Homer
Phone: 9134458190
Email: klest@gmail.com
Location: Larchmont
Program Interests: Kids Karate,
Evaluation Time & Date: 4:45pm on 10/9/2014

To approve or decline, please follow this link: http://sampledomain.com/wp-admin/admin.php?page=appointments&type=pending

If we can, can you please show me how? Thanks!

Regards,
Mike

  • Vaughan
    • Support/SLS MockingJay

    Hi,

    Sorry the above is a bit old now, there are actually filters you can use, but it isn't straightforward.

    Can you try adding the following to your theme functions.php

    function my_app_custom_notification ($body, $r, $app_id) {
        global $appointments;
    
        $body = "Someone Is Interested In {$appointments->get_service_name( $r->service)}\r\n
    Name: {$r->name}\r\n
    Phone: {$r->phone}\r\n
    Email: {$r->email}\r\n
    Evaluation Time & Date: {$r->start}\r\n\r\n
    To approve or decline, please follow this link: " . admin_url('admin.php?page=appointments&type=pending');
    
    	return $body;
    }
    add_filter('app-messages-notification-body', 'my_app_custom_notification',10, 3);

    I'm unsure of how to get the additional fields info in there at moment as well as the location, but let's check if it works first :slight_smile:

    Hope this helps

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.