Callback array hook not filled properly

SupportCallback array hook not filled properly
Maggie asked 3 years ago
I am following up with the question below. How do you get the custom fields to print out? $appointmentdata doesn't print custom fields. I’m using this code :
<?php
add_action( ‘ea_new_app_from_customer’, ‘custom_callback_function’, 10, 2 );
function custom_callback_function( $appointment_id, $appointment_data ) {
$to = ‘toto@gmail.com’;
$subject = ‘Confirmation’;
$body = $appointment_id . ‘-‘ . print_r($appointment_data,true);
$headers = array(‘Content-Type: text/html; charset=UTF-8’); wp_mail( $to, $subject, $body, $headers );
}