Calling into Appointments from the frontend


I have a client with Appointments+ installed which runs the booking system for their business. I have been asked to write some functionality that would reside on a 'normal' (non-admin) page, that needs to be able to call into Appointments+ to trigger the confirmation email routine, called send_notification().

Can you give me a short example of how I would do that? I'm bouncing my head off the wall here!

Many thanks!

  • aecnu
    • WP Unicorn

    Greetings Cam,

    Welcome to WPMU DEV!

    Thank you for the detailed description which is certainly appreciated.

    Though this is clearly in the realm of custom coding, I will see if I can get the lead developer in here with his invaluable insight into this plugin for his advice/advise for us.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • cmv
    • New Recruit

    No, I guess I'm not asking for custom code, just worded my question badly! :slight_smile:

    The route I'm probably going to try next is to write an add_action call and create a simple function that wraps the call into send_notification() and I'm more just looking for confirmation that this is the right way to go and that there is nothing else built-in that's more appropriate?


  • Hakan
    • The Incredible Smush


    I didn't understand what your function is, but

    global $appointments;
    $appointments->send_notification( $app_id );

    will send a notification email (not confirmation email) provided that you know the appointment ID ($app_id).

    action hook "app_new_appointment" around line 2267 will trigger an action and it will provide the appointment ID. Maybe that is what you are looking for.

    I hope this helps.


  • aecnu
    • WP Unicorn

    Greetings Cam,

    We have not heard back from you as to the status of this issue.

    If you are still having an issue please let us know so that we may try to get you fixed up as soon as possible by choosing to check mark this ticket as unresolved below and posting any new errors or symptoms you are noticing.

    This action will also bring your ticket up front back in plain view again within the ticket system.

    Thank you for being a WPMU DEV Community Member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.