Created
November 22, 2014 17:36
-
-
Save bappi-d-great/27eebfb971efb894c710 to your computer and use it in GitHub Desktop.
Send email to admin when an appointment is cancelled
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_app_email_on_appointment_cancelled ($app_id) { | |
global $appointments; | |
$to = $appointments->get_admin_email(); | |
wp_mail($to, 'An appointment has been cancelled', "An appointment with ID {$app_id} has just been cancelled."); | |
} | |
add_action('app-appointments-appointment_cancelled', 'my_app_email_on_appointment_cancelled'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment