Action after booking submitted/approved
-
I am trying to add a custom function after a booking is submitted (bookings are auto-approved). I can’t find an action hook other than
em_booking_status_changed
. Can this be used to perform an action after a booking is submitted since our bookings approved by default? If so, how do I use the this hook?I tried something like this:
add_action('em_booking_status_changed', 'create_draw_number', 10, 2);
function create_draw_number($booking) {
if ($booking->status == '1') {
// the booking is approved, so do this
}
}Nothing happened, so I don’t think I’m checking for the status correctly. And/or this action doesn’t happen after a booking is made.
Is this possible? Thank you!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.