Skip to content

Delivery date selection

The module adds a calendar field (flatpickr) on the checkout page, allowing customers to select a preferred delivery date.

Go to Polski > Modules and enable the Delivery date picker module. Since Polski PRO 1.22.0 the PRO modules have their own rows there; the module key is delivery_date. The module is off by default.

Setting Description Default
Field label Text displayed above the calendar Preferred delivery date
Field placeholder Text shown in the empty field Choose a date
Require a date to place the order Whether the customer must select a date No
Earliest date, days from today Lead time. 0 allows today, 1 means next day at the earliest 1
Latest date, days from today How far ahead the calendar reaches (minimum 1) 30
Blocked dates Specific unavailable dates (format: YYYY-MM-DD, comma-separated) empty
Date format on the order and in emails PHP date format used when the date is displayed d.m.Y (l)

The label and placeholder fields start empty on the Modules screen. The texts above are used only until you save the module settings. After the first save an empty field shows no label or placeholder, so fill both in.

All settings are stored in one option, polski_delivery_date.

Sundays are blocked by default. The Modules screen has no field for this; the value lives in the blocked_weekdays key of the polski_delivery_date option as comma-separated weekday numbers (0 = Sunday, 6 = Saturday). For example 0,6 blocks the whole weekend.

  1. A date field appears at checkout, below the order notes
  2. The customer clicks it and picks a date from the flatpickr calendar (shown as d.m.Y)
  3. Days outside the lead time and horizon, blocked weekdays and blocked dates are greyed out
  4. On submit the server checks the date again (see below)
  5. The date is saved in the order meta _polski_delivery_date

When the order is placed the module checks:

  • that a date was picked, if Require a date to place the order is on,
  • that the value is a valid YYYY-MM-DD date,
  • that it falls between today plus the earliest and today plus the latest number of days (store time zone),
  • that it is not on a blocked weekday;
  • that it is not on one of the Blocked dates (since 1.32.3).

Each failed check stops the order with a checkout notice, for example “Delivery date must be between 07.11.2026 and 06.12.2026.”

  • Order edit screen in the admin, below the shipping address
  • Order details page in My Account
  • Order emails, both HTML and plain text, after the order table

The date is not added as a column to the admin order list.

The date is saved through the WooCommerce order object (update_meta_data), so it works with both HPOS and the legacy posts storage. The meta key is _polski_delivery_date and the value is the raw YYYY-MM-DD string; the display format is applied only when it is shown. To read it in your own code:

$date = $order->get_meta( '_polski_delivery_date' ); // e.g. '2026-12-23'

The module exposes no filters or actions of its own.

There is no built-in holiday calendar. To block holidays (e.g. Christmas, Easter), add the dates in the YYYY-MM-DD format separated by commas, and update the list every year:

2026-12-25,2026-12-26,2026-04-05,2026-04-06,2026-05-01,2026-05-03

There is no same-day cutoff hour either: the lead time counts whole days from today.

The delivery date works on the classic (shortcode) checkout only. The block-based checkout shows no date field, and since 1.32.3 the module no longer reads a date from the Store API.