- marked as enhancement
Appointments with custom statuses don't show on the calendar view
Issue #828
new
Reported here using this code:
// Add appointments statuses for user.
add_filter('woocommerce_appointment_statuses_for_user', function($stats){
$stats['custom-status-1'] = 'Custom status 1';
$stats['custom-status-2'] = 'Custom status 2';
return $stats;
});
// Register appointments statuses.
add_action( 'init', 'register_custom_appointment_statuses' );
function register_custom_appointment_statuses() {
register_post_status(
'custom-status-1',
array(
'label' => '<span class="status-custom-status-1 tips">Custom status 1</span>',
'public' => true,
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
'label_count' => _n_noop( 'Custom status 1 <span class="count">(%s)</span>', 'Custom status 1 <span class="count">(%s)</span>' ),
)
);
register_post_status(
'custom-status-2',
array(
'label' => '<span class="status-custom-status-2 tips">Custom status 1</span>',
'public' => true,
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
'label_count' => _n_noop( 'Custom status 2 <span class="count">(%s)</span>', 'Custom status 2 <span class="count">(%s)</span>' ),
)
);
}
Comments (1)
-
reporter - Log in to comment