Holiday Notice – Support Unavailable on April 18 and April 21
We just wanted to let you know that our support team will be offline on Friday, April 18th (Good Friday) and Monday, April 21st (Easter Monday) due to the holidays.
We'll be back on Tuesday, ready to assist you!
In the meantime, if you need any help, feel free to:
-
Use the support widget in the bottom right corner on our websites (Amelia and wpDataTables) — our latest AI-powered assistant is there 24/7 to help with basic and intermediate questions,
-
Browse our detailed documentation (Amelia, wpDataTables)
-
Explore helpful articles,
-
Or check out our YouTube channels for video guides!
Amelia YouTube Channel
wpDataTables YouTube Channel
Thank you for your understanding, and we wish you a wonderful holiday weekend!
Hello,
I want to know how can I add some custom code after each booking. I´m using a personal database to store more information for the appointments pointing to the Amelia databases and just need to add a new row on my table once the booking was done, how can I do it? Any hook I can add'
Thank you.
Angel.
Hi Angel,
Thank you for your inquiry.
We don't provide WP hooks in our plugin, only JS callback method (with appointment data as parameter), that will be executed (if method is defined) after successful booking.
This method can be added over page editor, e.g.:
<script>
window.beforeAddToCalendarLoaded = function (data) {
// your code goes here
}
</script>
Best regards.
Hi Isidora,
So in the page I have the shortcode [ameliabooking] I can add the code you just sent me?
All that I need from the amelia database "wp_amelia_appointments" is the id field of the appointment.
Regards.
Hi Angel,
You will place the code on that page, just in the text area. Please see the picture below for this:
Callback method will return parameter data with fields: data.responseData.booking.appointmentId AND, data.responseData.booking.id that you could use.
Method will be executed after booking so you can get appointment ID from parameter data.
Best regards.
Hi Isidora,
So I guess is not possible to run a SQL query on that function to populate my table with some of that amelia table info, right?
Thanks.
Angel.
Hi Andel,
No, unfortunately you can't. The only way would be to use some existing, or write new endpoint, and to send the data with ajax call.
Best regards.
Hi Isidora,
Ok, thank you for your response.
Regards.
Angel.
Hi Angel,
You are welcome.
Best regards.