Show Scheduled Users not showing in Appointments+

I upgraded to Appointments+ purely for the ability to 'Show Scheduled Users'. I've activated this addon but nothing shows on my calendar. Could you please let me know what I'm doing wrong? Is there a setting somewhere I have to change?

Thanks.

  • Vinod Dalvi

    Hi Phillipa,

    Welcome to the WPMU Dev community and thank you for your question.

    The Appointments + add-on "Show Scheduled Users" shows scheduled user names for unavailable appointment schedule segments on hovering the unavailable appointment schedule time as displayed in the attached screenshot.

    Is it not working for you like this?

    If not then could you please share me the Appointments page URL from your site so that i can test it?

    Would you mind if I logged in to your site and did some troubleshooting? This might help get to the bottom of this faster. If this is ok, just grant me temporary admin access to your site by clicking "Grant Access" button in the WPMU DEV Dashboard Settings as described on the following page and reply on this thread after granting it?

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Kind Regards,
    Vinod Dalvi

  • Vinod Dalvi

    Hi Phillipa,

    Thank you for your reply.

    I have quickly developed a custom code solution for you to display it on the calendar itself. I have not fully tested it but it seems working.

    To use this solution try editing the following Appointments + plugin file on line number as displayed below

    Before Editing :

    // Check for today
    if ( $this->local_time > $ccs && $this->local_time < $cce )
    	$class_name = $class_name . ' today';
    
    $ret .= '<td class="'.$class_name.'" title="'.date_i18n($this->date_format, $ccs).'"><p>'.$i.'</p>
    <input type="hidden" class="appointments_select_time" value="'.$ccs .'" /></td>';

    After Editing :

    // Check for today
    if ( $this->local_time > $ccs && $this->local_time < $cce )
    	$class_name = $class_name . ' today';
    if ( $this->is_a_timetable_cell_free ){
    	$ret .= '<td class="'.$class_name.'" title="'.date_i18n($this->date_format, $ccs).'"><p>'.$i.'</p>';
    }else{
    	$data = explode('x', $schedule_key);
    if (count($data) != 2) {
    $interval_start = current_time('timestamp');
    $interval_end = strtotime('next month', $interval_start);
    } else {
    $interval_start = $data[0];
    $interval_end = $data[1];
    }
    
    global $appointments, $wpdb;
    $table = $appointments->app_table;
    $where = "AND (status='pending' OR status='paid' OR status='confirmed' OR status='reserved')";
    
    if ($appointments->service) {
    $where .= " AND service={$appointments->service}";
    }
    if ($appointments->worker) {
    $where .= " AND worker={$appointments->worker}";
    }
    
    $sql = "SELECT name,user,start,end FROM {$table} WHERE UNIX_TIMESTAMP(start)>'{$interval_start}' AND UNIX_TIMESTAMP(end)<'{$interval_end}' {$where}";
    $customers = $wpdb->get_results($sql);
    if (!empty($customers))
    $names = join("\n", array_unique(wp_list_pluck($customers, 'name')));
    	$ret .= '<td class="'.$class_name.'" title="'.$names.'"><p>'.$i.'</p>';
    }
    $ret .= '<input type="hidden" class="appointments_select_time" value="'.$ccs .'" /></td>';

    Note: This is a custom solution and to implement it you are making changes in the plugin file and these changes will be overwritten and lost when you update the plugin and you will have to make these again after plugin updation.

    I will also move this over to the features & feedback section. This way it can be considered for future development, and we can also see what other community members think about the feature request.

    Best Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.