Don’t miss our Special Offer!

Up to 50% off
Grab Amelia
Grab Amelia

Amelia WP Hooks for Bookings

Please note that using hooks requires a certain level of programming skills and included support refers only to advice.

Booking added

amelia_before_booking_added_filter

Users can use this filter to change booking data before it is added from the frontend.

Type: filter

Example:

function example($appointment)
{
    // change appointment
    return $appointment;
}

add_filter('amelia_before_booking_added_filter', 'example', 10, 1);

amelia_before_booking_added

Users can use this hook to do an action before the booking is added from the frontend.

Type: action

Example:

function example($appointment)
{
    // do action
}
add_action('amelia_before_booking_added', 'example', 10, 1);

amelia_after_booking_added

Users can use this hook to do an action after a booking is added from the frontend.

Type: action

Example:

function example($appointment)
{
    // do action
}
add_action('amelia_after_booking_added', 'example', 10, 1);

Booking canceled

amelia_before_booking_canceled

Users can use this hook to do an action before the booking is canceled. (From the customer panel or e-mail)

Type: action

Example:

function example($booking)
{
    // do action
}

add_action('amelia_after_booking_canceled', 'example', 10, 1);

amelia_after_booking_canceled

User can use this hook to do an action after the booking is canceled. (From the customer panel or e-mail)

Type: action

Example:

function example($booking)
{
    // do action
}

add_action('amelia_after_booking_canceled', 'example', 10, 1);

Booking rescheduled

amelia_before_booking_rescheduled

Users can use this hook to do an action before the appointment is rescheduled. (From the customer panel or calendar page on the backend)

Type: action

Example:

function example($oldAppointment, $booking, $bookingStart)
{
    // do action
}

add_action('amelia_before_booking_rescheduled', 'example', 10, 3);

amelia_after_booking_rescheduled

Users can use this hook to do an action after the appointment is rescheduled. (From the customer panel or calendar page on the backend)

Type: action

Example:

function example($oldAppointment, $booking, $bookingStart)
{
    // do action
}

add_action('amelia_after_booking_rescheduled', 'example', 10, 3);

Post-booking actions

amelia_before_post_booking_actions_filter

Users can change the appointment data before post-booking actions (sending e-mails, adding to the calendar, creating zoom meeting…) are triggered.

Type: filter

Example:

function example($resultData)
{
    // change data
    return $resultData;
}

add_filter('amelia_before_post_booking_actions_filter', 'example', 10, 1);

amelia_before_post_booking_actions

Users can do an action before post-booking actions (sending e-mails, adding to the calendar, creating zoom meeting…) are triggered.

Type: action

Example:

function example($resultData)
{
    // do action
}

add_action('amelia_before_post_booking_actions', 'example', 10, 1);

Booking status filters

Users can these filters to change/add data being sent to the webhook. These filters are called before the webhooks and after other post-booking actions (sending e-mails, google calendar, zoom meeting…)

  • AmeliaAppointmentBookingCanceledFilter
  • AmeliaAppointmentBookingAddedFilter
  • AmeliaAppointmentBookingStatusUpdatedFilter
  • AmeliaEventBookingCanceledFilter
  • AmeliaEventBookingAddedFilter
  • AmeliaEventBookingStatusUpdatedFilter

Type: filter

Example:

function example($data)
{
    return $data; 
} 

add_filter('AmeliaAppointmentBookingAddedFilter', 'example', 10, 1);

Booking status actions

Users can these hooks to do an action before the webhook is sent. These hooks are called before the webhooks and after other post-booking actions (sending e-mails, google calendar, zoom meeting…)

  • AmeliaAppointmentBookingCanceled
  • AmeliaAppointmentBookingAdded
  • AmeliaAppointmentBookingStatusUpdated
  • AmeliaEventBookingCanceled
  • AmeliaEventBookingAdded
  • AmeliaEventBookingStatusUpdated

Type: action

Example:

function example($reservation, $bookings, $container)
{
    // do action
}

add_action('AmeliaAppointmentBookingCanceled', 'example', 10, 3);

Booking status filters

Users can these filters to change/add data being sent to the webhook in the header.

  • AmeliaAppointmentBookingCanceledFilterHeader
  • AmeliaAppointmentBookingAddedFilterHeader
  • AmeliaAppointmentBookingStatusUpdatedFilterHeader
  • AmeliaEventBookingCanceledFilterHeader
  • AmeliaEventBookingAddedFilterHeader
  • AmeliaEventBookingStatusUpdatedFilterHeader

Type: filter

Example:

function example_callback($header, $data)
{
    return $headers; 
} 

add_filter('AmeliaAppointmentBookingAddedFilterHeader', 'example_callback', 10, 2);

Booking saved

amelia_before_appointment_booking_saved_filter

Users can change the appointment data before it is saved to the database.

Type: filter

Example:

function example($booking, $reservation)
{
    // change booking
    return $booking;
}

add_filter('amelia_before_appointment_booking_saved_filter', 'example', 10, 2);

amelia_before_appointment_booking_saved

Users can do an action before the appointment is saved to the database.

Type: action

Example:

function example($booking, $reservation)
{
    // do action
}

add_action('amelia_before_appointment_booking_saved', 'example', 10, 2);

amelia_after_appointment_booking_saved

Users can do an action after the appointment is saved to the database.

Type: action

Example:

function example($booking, $reservation)
{
    // do action
}

add_action('amelia_after_appointment_booking_saved', 'example', 10, 2);