Display Additional Fields in Appointments Table

Hi

Ok so I have the plugin installed and working almost as I want. I have added several additional fields to my Appointment Booking form and these are all required fields.

In class_app_shortcodes.php I locate the below data

$results = $wpdb->get_results( "SELECT * FROM " . $appointments->app_table . " WHERE (".$stat.") ORDER BY ".$appointments->sanitize_order_by( $order_by )." " );

$ret = '';
$ret .= '<div class="appointments-all-appointments">';
$ret .= $title;
$ret = apply_filters( 'app_all_appointments_before_table', $ret );
$ret .= '<table class="all-appointments tablesorter"><thead>';
$ret .= apply_filters( 'app_all_appointments_column_name',
'<th class="all-appointments-service">'. __('Service', 'appointments' )
. '</th><th class="all-appointments-provider">' . __('Referee', 'appointments' )
. '</th><th class="all-appointments-client">' . __('Requestor', 'appointments' )
. '</th><th class="all-appointments-date">' . __('Kick Off', 'appointments' )
// . '</th><th class="all-appointments-hometeam">' . __('Home Team', 'appointments' )
. '</th><th class="all-appointments-status">' . __('Status', 'appointments' ) . '</th>'
);
$colspan = 6;

$ret .= '</thead><tbody>';

if ( $results ) {
foreach ( $results as $r ) {
$ret .= '<tr><td>';
$ret .= $appointments->get_service_name( $r->service ) . '</td>';
$ret .= apply_filters('app-shortcode-all_appointments-after_service', '', $r);

$ret .= '<td>';
$ret .= $appointments->get_worker_name( $r->worker ) . '</td>';
$ret .= apply_filters('app-shortcode-all_appointments-after_provider', '', $r);

$ret .= '<td>';
$ret .= $appointments->get_client_name( $r->ID ) . '</td>';
$ret .= apply_filters('app-shortcode-all_appointments-after_client', '', $r);

$ret .= '<td>';
$ret .= date_i18n( $appointments->datetime_format, strtotime( $r->start ) ) . '</td>';
$ret .= apply_filters('app-shortcode-all_appointments-after_date', '', $r);

$ret .= '<td>';
$ret .= App_Template::get_status_name($r->status);
$ret .= '</td>';
$ret .= apply_filters('app-shortcode-all_appointments-after_status', '', $r);

$ret .= apply_filters( 'app_all_appointments_add_cell', '', $r );
$ret .= '</tr>';
}
}

If I want to add an additional column to the table to show one of the additional fields I configured how do I insert that? I appreciate col_span will need to increase and I have no issues with adding the column title. If it pulling the data from the database that is causing me the issue.

So the data I am looking to use is called ‘home team’

I have tried adding

$ret .= '<td>';
$ret .= $appointments->get_appointments_data( $r->hometeam ) . '</td>';

But this does not work. Any help would be appreciated.

Thanks

Wayne