calculate the expected shipping date when user submits an order r. The shop owner has decided NOT to ship on certain days of the week ($holidays variable ) $holidays = ["Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"]; There is a cut off time for placing an order that will be shipped on the same day, for example, orders placed before 11 in the morning will be shipped on the same day, else it will only be shipped the next day/next shipping allowed day ($cutOffTime ) $cuttofftime="11"; The main code with logic should be added to getShippingDate in functions.php and it should return the date (Y-m-d format) in which the product will be shipped.