How to get Additional Data in Appointment+

Hello, since upgrading to last version of A+ I was using the following code to get access to the additional data saved for each appointment (enabling the additional data add-on):

public function _get_appointment_meta($appID) {
$appointments_data = get_option('appointments_data', array());
return empty($appointments_data[$appID]) ? array() : $appointments_data[$appID];

I needed that function because I did not find a public function to call to get access to the data.

Now, with upgrading to A+ last version, the code does no more work.

Can you please tell me if something changed in how the additional data are saved ?
How can I amend the code ?

Thanks for help

Kind regards


  • Antonio
    • The Incredible Code Injector

    Hello Jude,

    thanks for your answer.

    I tried your code but unlucky it's not working.

    I'm trying to access additional fields from another plugin and I suppose the problem is that my plugin knows nothing about the function "appointments_update_appointment_meta".

    Can you explain to me if those fields are still saved in the option table o somewhere else ?

    And in both case, can you suggest to me a different and autonomous code to access the fields ?

    Thanks a lot for your support


  • Sajid
    • DEV MAN’s Sidekick

    Hi Antonio,
    Hope you are doing good today :slight_smile:

    The additional fields are stored in wp_app_appointmentmeta table in database and can be fetched either $wpdb class object or using built in function (appointments_get_appointment_meta) of appointments+.

    Please try below function instead and let us know how it went. I tested it on my own site and it retrieving the correct additional fields associated with an appointment.

    $appointments_data = appointments_get_appointment_meta( $app_id, 'additional_fields') ;

    Hope that helps! Feel free to post a reply if you need further assistance :slight_smile:

    Best Regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.