We're Moving to a New Support Platform – Starting June 1st!

We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.

You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.

While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.

We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.

Thanks for your continued support and trust – we’re excited to bring you an even better support experience!

Okay
  Public Ticket #2556422
hooks
Closed

Comments

  • Matteo started the conversation

    Hi,

    In plugin backend there are Web Hooks as I can see, but I need a php hook, to insert in the functions.php when an appointment prenotation is completed, to update my custom DB table.

    Could you providide to me the hook? I can't find anything on internet.

    Thank you

  • [deleted] replied

    Hi Matteo,

    Thank you for your question.

    Unfortunately, there isn't such option in Amelia with its current built-in features and there are no hooks for actions or filters for that matter in Amelia. There are a few JS hooks which are triggered depending on the view:

    window.beforeAddToCalendarLoaded()
    window.beforeBookingLoaded()
    window.beforeSearchLoaded()
    window.beforeSearchFiltered()
    window.afterSearchFiltered()
    window.beforeConfirmedBooking()
    window.beforeCatalogLoaded()
    window.afterSelectCatalogCategory(object_category)
    window.beforeCatalogCategoryLoaded(object_category)
    window.beforeCatalogServiceLoaded(object_category, object_service)
    window.afterSearchActivateService(object_appointment, object_serviceActive)
    window.afterSearchGoToSecondStep(object_appointment, object_serviceActive)
    window.afterBookingSelectDateAndTime(object_appointment, object_serviceId, object_providerId, object_locationId)
    window.afterBookingSelectService(object_appointment, object_serviceId, object_providerId, object_locationId)
    window.beforeConfirmBookingLoaded(object_appointment, object_service, object_provider, object_location)
    window.afterConfirmBooking(object_appointment, object_service, object_provider, object_location)


  • Matteo replied

    Thank you, that can help me.

    When i'm calling this function

    window.afterBookingSelectService(object_appointment, object_serviceId, object_providerId, object_locationId)
    

    can I set the value of "FirstName", "LastName" and a Custom Field in JS? if Yes could you provide me an example?

    I saw those functions (attachment file) in the browser console.

    Thank you

  • [deleted] replied

    Hi Matteo,

    You can try with something like this:

    <script>
    window.afterBookingSelectService = function () {    jQuery('.el-input input').attr('text/javascript', "Whatever you want")
    }
    </script>
    


    You can also check out this thread (for example), to see how you can populate form fields using jQuery.


  • Matteo replied

    Hi!!!

    I would like to ask if is it possible, via a function in functions.php detect when an appointment is moved or removed from backend?

    Thank you

  • [deleted] replied

    Hello Matteo,

    Can you please elaborate a bit more, what is the use-case?