I would like to hook into the cancellation function to run my own script when someone cancels a booking. I know you don't have any PHP hooks or filters, but I did find a support ticket on the WordPress Support Repository that states you have JavaScript hooks. Could you please let me know what that may be? Best regards,
JS files are modified (minimized) in public version of plugin (in our development environment is accessible), but unfortunately I can not send you our source code because that is the policy of our company.
All those files that have extension .vue are compressed and minimized in JS files that is very hard and not recommended modifying. So in order to add some other features you can unminify the js and customize it.
In the CancelBooking webhook we forward the endpoint, but the URL needs to contain the cancellation token (which can be found in that webhook).
Hello there,
I would like to hook into the cancellation function to run my own script when someone cancels a booking. I know you don't have any PHP hooks or filters, but I did find a support ticket on the WordPress Support Repository that states you have JavaScript hooks. Could you please let me know what that may be? Best regards,
Gordon
Hi Gordon
Thank you for purchasing Amelia, and for reaching out to us.
Unfortunately we don't have hooks (action and filters) at the moment. What we have is a few JS hooks that is triggered depends on the view:
JS files are modified (minimized) in public version of plugin (in our development environment is accessible), but unfortunately I can not send you our source code because that is the policy of our company.
All those files that have extension .vue are compressed and minimized in JS files that is very hard and not recommended modifying. So in order to add some other features you can unminify the js and customize it.
In the CancelBooking webhook we forward the endpoint, but the URL needs to contain the cancellation token (which can be found in that webhook).
Have a nice day!
@elena: Another post says there are hooks: https://tmsplugins.ticksy.com/ticket/2591394/
<?php
function amelia_booking_added_hook($reservation, $bookings, $container) {
}
add_action('AmeliaBookingAdded', 'amelia_booking_added_hook', 10, 3);
function amelia_booking_time_updated_hook($reservation, $bookings, $container) {
}
add_action('AmeliaBookingTimeUpdated', 'amelia_booking_time_updated_hook', 10, 3);
function amelia_booking_status_updated_hook($reservation, $bookings, $container) {
}
add_action('AmeliaBookingStatusUpdated', 'amelia_booking_status_updated_hook', 10, 3);
function amelia_booking_canceled_hook($reservation, $bookings, $container) {
}
add_action('AmeliaBookingCanceled', 'amelia_booking_canceled_hook', 10, 3);
?>
Hi Alexander
Yes, this actions will be executed before our WebHook (Amelia Settings -> Integrations -> WebHook) is executed.
First parameter is appointment, second is booking.
Please feel free to open a new ticket if you need some further assistance.