I need to make a custom field that is a select type, however, I would want to populate it based on certain, dynamic conditions. I have no problem writing the PHP code, however, it does not seem like Amelia has a developer documentation.
In this case, for example, I need to search through a CPT posts (I already have a working code for the search), and then populate it based on taxonomies (also have a working code for getting them.
Now I just need some hook so that I can modify the select field giving it the correct options.
<script>
window.ameliaActions = {
ViewContent: function (success = null, error = null, data) {
//triggered when the form loads
console.log('ViewContent HOOK')
console.log(data)
console.log('------------')
},
SelectService: function (success = null, error = null, data) {
//triggered when the service is selected/changed in the form
console.log('SelectService HOOK')
console.log(data)
console.log('------------')
},
SelectEmployee: function (success = null, error = null, data) {
//triggered when the employee is selected/changed in the form
console.log('SelectEmployee HOOK')
console.log(data)
console.log('------------')
},
SelectLocation: function (success = null, error = null, data) {
//triggered when the location is selected/changed in the form
console.log('SelectLocation HOOK')
console.log(data)
console.log('------------')
},
SelectCategory: function (success = null, error = null, data) {
//triggered when the category is selected/changed in the form
console.log('SelectCategory HOOK')
console.log(data)
console.log('------------')
},
SelectPackage: function (success = null, error = null, data) {
//triggered when the package is selected/changed in the form
console.log('SelectPackage HOOK')
console.log(data)
console.log('------------')
},
InitiateCheckout: function (success = null, error = null, data) {
//triggered once the customer lands on the "info" page where they fill in their details
console.log('InitiateCheckout HOOK')
console.log(data)
console.log('------------')
},
Schedule: function (success = null, error = null, data) {
//triggered once the 'on-site' booking is completed
console.log('Schedule HOOK')
console.log(data)
console.log('------------')
},
Purchased: function (success = null, error = null, data) {
//triggered once an online booking is completed
console.log('Purchased HOOK')
console.log(data)
console.log('------------')
},
beforeBooking: function (success = null, error = null, data) {
//triggered when the "Confirm" button is clicked but before the booking is completed.
//This hook currently doesn't work for Mollie and WooCommerce payments
console.log('Before booking is created HOOK')
console.log(data)
console.log('------------')
},
}
</script>
These are the same hooks used in Google Analytics and Facebook Pixel integrations, but if you need some other hooks added, please let us know which ones and explain what they would contain and when they should be triggered.
However, those are javascript hooks. I am looking for PHP hooks so I can do it on server side during the render itself, to prevent as much need for javascript, especially as there is cache on the site to speed up the process, and also as one javascript error can ruin the whole page actions.
I have experience in both languages, but would really prefer to render it server side.
You can check out the following part of the documentation.
If you have coding skills ( or if you have your developer),
you can set up several hooks that will send data from the Amelia plugin to any other application.
It is good to use this option if you want to send, for example, customer data to some CRM platform.
You can use any automation tool that allows you to integrate other applications with Amelia, but in our documentation, we have two different methods shown with examples.
1. Our top recommendation will be to try our integration with Thrive Automator.
This integration offers you to send data from Amelia to numerous third-party applications after certain actions. Whether you need to add customer details to your CRM,
send an additional email after booking or cancelling, update the Google Spreadsheet, etc, the integration with Thrive Automator is made for you.
Please check our Documentation page that shows an example of how Thrive Automator is used with Amelia here.
2. Alternatively, you can also check out the possibility of sending data from Amelia booking with Zapier,
I am a developer, but I dont need nor want thrive automaton. As long as you can get me the documentation for the WordPress PHP hooks Amelia exposes I can get by easily. Seeing as Thrive uses those automation, that means Amelia must have them
Hi.
I need to make a custom field that is a select type, however, I would want to populate it based on certain, dynamic conditions. I have no problem writing the PHP code, however, it does not seem like Amelia has a developer documentation.
In this case, for example, I need to search through a CPT posts (I already have a working code for the search), and then populate it based on taxonomies (also have a working code for getting them.
Now I just need some hook so that I can modify the select field giving it the correct options.
Would appreciate any help on this.
Hello Shay,
Thank you for reaching out to us.
Amelia currently has the following hooks:
These are the same hooks used in Google Analytics and Facebook Pixel integrations, but if you need some other hooks added, please let us know which ones and explain what they would contain and when they should be triggered.
Kind Regards,
Uros Jovanovic
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
Hi
Thanks for your answer.
However, those are javascript hooks. I am looking for PHP hooks so I can do it on server side during the render itself, to prevent as much need for javascript, especially as there is cache on the site to speed up the process, and also as one javascript error can ruin the whole page actions.
I have experience in both languages, but would really prefer to render it server side.
Hello Shay,
Thank you for the update on this.
Unfortunately, there are no PHP hooks at the moment, the only hooks available ar the JS hooks that I provided you with in the previous response.
Please let me know if you have any other questions.
Kind Regards,
Uros Jovanovic
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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 Shay,
You can check out the following part of the documentation.
If you have coding skills ( or if you have your developer),
you can set up several hooks that will send data from the Amelia plugin to any other application.
It is good to use this option if you want to send, for example, customer data to some CRM platform.
You can use any automation tool that allows you to integrate other applications with Amelia, but in our documentation, we have two different methods shown with examples.
1. Our top recommendation will be to try our integration with Thrive Automator.
This integration offers you to send data from Amelia to numerous third-party applications after certain actions. Whether you need to add customer details to your CRM,
send an additional email after booking or cancelling, update the Google Spreadsheet, etc, the integration with Thrive Automator is made for you.
Please check our Documentation page that shows an example of how Thrive Automator is used with Amelia here.
2. Alternatively, you can also check out the possibility of sending data from Amelia booking with Zapier,
you can check out How to Connect Amelia WordPress Booking Plugin and Mailchimp with Zapier here.
So, you can check out both and decide what will be best for your use-case.
Let us know if you have further questions.
Thank you.
Kind Regards,
Uros Jovanovic
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
I am a developer, but I dont need nor want thrive automaton. As long as you can get me the documentation for the WordPress PHP hooks Amelia exposes I can get by easily. Seeing as Thrive uses those automation, that means Amelia must have them
Hello Shay,
Thank you for clearing that up.
Please find the developers documentation attached to this response.
Attached files: Developers docs - Sheet1.pdf
Kind Regards,
Uros Jovanovic
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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