<?php
add_action( 'woocommerce_checkout_process', 'woofood_holiday_dates_hook', 88888 );
 function woofood_holiday_dates_hook() {
   global $woocommerce;

    $dates = array();

    //dates closed//
    $dates[] = "2020-12-25";
    $dates[] = "2020-12-26";
    $dates[] = "2020-12-27";

    $date_to_deliver = isset($_POST["woofood_date_to_deliver"]) ?  $_POST["woofood_date_to_deliver"] : "";
    $date_to_pickup = isset($_POST["woofood_date_to_pickup"]) ?  $_POST["woofood_date_to_pickup"] : "";

    
    if(in_array(current_time("Y-m-d"), $dates) || in_array($date_to_deliver, $dates  ) || in_array($date_to_pickup, $dates  ) ) 
    {
        wc_add_notice( 
                  __( 'Sorry, but we are closed for Holidays ', 'woofood-plugin' ), 'error' 
            );
    }

      

    }