Provide Booking details of users once booked

Would like to know if there is any workaround to shown the booking details like Id, email, and date of appointment if possible once a visitor has booked an appointment.

Redirecting with the info in the "thank you" page, would be helpful.

  • Nithin

    Hello Evgeny,

    Hope you are doing good today. :slight_smile:

    At the moment, the plugin only offers the option to display the service, service provider, client name, date, and status via the following shortcode:

    [app_my_appointments status="completed,pending,paid,confirmed" provider="1" allow_cancel="1"]

    You'll have to make sure the option Login required is enabled for the above shortcode to work, the option is located under Appointments > Settings > General > Accessibility > Login Required.

    Once the above option is enabled, you can add the shortcode in the Thank you page as you have mentioned, and it should list the appointments.

    I'm afraid, there isn't any out of the box setting to display email Id via the mentioned shortcode, I'll check with the developer to see whether there is any quick workaround to make that work, and will keep you posted asap.

    You can find the list of all the shortcodes related to Appointments+ via the following manual:
    https://premium.wpmudev.org/docs/getting-started/appointments-shortcode-reference/

    Kind Regards,
    Nithin

  • Nithin

    Hello Evgeny,

    I got an update from the developer, you can add the following code as a mu-plugins, and it should display the email address as mentioned above along with the above mentioned shortcode.

    <?php
    
    add_filter( 'app_my_appointments_column_name', function( $cols_html ){
        return $cols_html. '<th class="my-appointments-email">' . __( 'Email', 'appointments' ) . '</th>';
    }, 10 );
    
    add_filter( 'app_my_appointments_add_cell', function( $out, $r ){
        return "{$out}<td>{$r->email}</td>";
    }, 10 ,2 );

    Please do note that the above code is used to display the email address, along with other details displayed in the shortcode mentioned above. You'll have to use the shortcode to make the code work.

    You can implement the code via your child themes functions.php file, or via mu-plugins. Please check the following article on how to implement the code as a mu-plugins:
    https://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    Kind Regards,
    Nithin