Comments Rami Sbaity started the conversation2 weeks ago on November 6, 2024 at 10:01amHello, We are using Amelia plugin (Wordpress) for appointment purposes, where users can book an appointment with doctors. Our initial requirement is to re-direct the user to a thankyou page after submitting an appointment and NOT to the checkout page. I'm using the hooks from https://wpamelia.com/wp-hooks-appointments/. I created a custom plugin with the below code: // Test Amelia hook by logging outputfunction amelia_hook() { error_log('Amelia hook triggered'); die('Amelia hook triggered');} add_action('amelia_before_appointment_added', 'amelia_hook'); but nothing happens. am i doing something wrong here? 698Stefan replied2 weeks ago on November 6, 2024 at 12:09pmHello Rami, Thanks for reaching out to us. The issue here is the "DIE" part in hook, this part will stop the code from executing. There is the hook function amelia_hook() { error_log('Amelia hook triggered'); die('Amelia hook triggered');}add_action('amelia_before_appointment_added', 'amelia_hook'); function my_custom_function($appointmentData) { error_log('Amelia hook triggered'); die('Amelia hook triggered');} add_action('amelia_before_booking_added', 'my_custom_function'); amelia_before_appointment_added is for the backend booking amelia_before_booking_added is for frontend booking When using "die" part, the code wont execute and the appointment wont be stored. Kind Regards, Stefan Petrov[email protected] Rate my support wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community You can try wpDataTables add-ons before purchasing on these sandbox sites: Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail TablesRami Sbaity replied2 weeks ago on November 6, 2024 at 1:41pmHello Stefan, Thank you so much for replying. I used the die function just to make sure my custom function is being triggered. I'll amend the code a bit according to your recommendation and test. Thank you again, 698Stefan replied2 weeks ago on November 6, 2024 at 1:44pmYou are welcome, Rami. I'm glad that we can help. Should you have any other questions or issues, feel free to reach out to us and we will kindly provide assistance. Kind Regards, Stefan Petrov[email protected] Rate my support wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community You can try wpDataTables add-ons before purchasing on these sandbox sites: Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables Sign in to reply ...
Hello,
We are using Amelia plugin (Wordpress) for appointment purposes, where users can book an appointment with doctors.
Our initial requirement is to re-direct the user to a thankyou page after submitting an appointment and NOT to the checkout page.
I'm using the hooks from https://wpamelia.com/wp-hooks-appointments/.
I created a custom plugin with the below code:
// Test Amelia hook by logging output
function amelia_hook() {
error_log('Amelia hook triggered');
die('Amelia hook triggered');
}
add_action('amelia_before_appointment_added', 'amelia_hook');
but nothing happens. am i doing something wrong here?
Hello Rami,
Thanks for reaching out to us. The issue here is the "DIE" part in hook, this part will stop the code from executing. There is the hook
function amelia_hook() {
error_log('Amelia hook triggered');
die('Amelia hook triggered');
}
add_action('amelia_before_appointment_added', 'amelia_hook');
function my_custom_function($appointmentData) {
error_log('Amelia hook triggered');
die('Amelia hook triggered');
}
add_action('amelia_before_booking_added', 'my_custom_function');
amelia_before_appointment_added is for the backend booking
amelia_before_booking_added is for frontend booking
When using "die" part, the code wont execute and the appointment wont be stored.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hello Stefan,
Thank you so much for replying. I used the die function just to make sure my custom function is being triggered.
I'll amend the code a bit according to your recommendation and test.
Thank you again,
You are welcome, Rami.
I'm glad that we can help.
Should you have any other questions or issues, feel free to reach out to us and we will kindly provide assistance.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables