The hook_commerce_delivery_timeslot_alter() will be called for each timeslot before it is rendered.
You can also use hook_commerce_delivery_times_alter() that is called only once with the entire array is loaded.

Example of making the 1'st of Jan unavailable and changing the label to "closed::

<?php
/**
 * Implements hook_commerce_delivery_timeslot_alter().
 */
function bulkaco_commerce_delivery_timeslot_alter($key1, &$timeslot, &$title) {
    $d = date("Y") . '-01-01';
    if ($key1 == $d) {
      $title = t('Closed');
      $timeslot['deliveries'] = 0;
    }
}
?>

Comments

guy_schneerson’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.