We are still testing appointments on our DEV site. When

Hi. We are still testing appointments on our DEV site. When we fill out a test Appointment, our site's email address (via WordPress Username) get's the below email. Why does it say "has an ID 5"? I know it is based on the latest submission, but why is showing the ID value instead of the person's name?

The new appointment has an ID 5 and you can edit it clicking this link:

Thanks

  • Vaughan

    Hi Randy,

    Hope you're well?

    It shows the ID of the appointment because that's what it was designed to do.

    You can change the message by hooking into the filter for 'app-messages-notification-body'

    Something like.

    function my_app_notification_body ($body, $r, $app_id) {
        $body = "{$r->name} has just created an appointment\n\n
            You can edit it clicking this link: " . admin_url('admin.php?page=appointments&type=pending') . "\n\n
        Appointment ID {$app_id}";
    
        return $body;
    
    }
    add_filter('app-messages-notification-body', 'my_app_notification_body', 20, 3);

    I haven't tried this though, but hopefully that should work, just add the above code to your theme functions.php

    Hope this helps

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.