=== DAPS - Delivery and Pickup Scheduler for WooCommerce ===
Contributors: hixfo360
Tags: woocommerce, delivery date, pickup, checkout, order scheduling
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let customers pick a delivery or pickup date & time at WooCommerce checkout, with hours, holidays, capacity limits, and restrictions.

== Description ==

DAPS - Delivery and Pickup Scheduler for WooCommerce adds a date & time picker to your WooCommerce checkout, so customers can choose exactly when they want their order delivered or when they'll pick it up in store. It works on both the classic (shortcode) checkout and the newer Block Checkout.

**Main features**

* Enable Delivery only, Pickup only, or both.
* Separate weekly working hours and slot length for Delivery and Pickup (per weekday: open/closed, start time, end time, slot duration).
* Store closed dates / holidays.
* Minimum lead time (e.g. hide same-day slots less than 2 hours away) plus an optional daily cutoff time.
* Maximum orders per time slot, with full slots automatically hidden and re-checked at order placement.
* Restrict Delivery to specific WooCommerce shipping zones.
* Restrict Delivery/Pickup by a minimum cart subtotal.
* Hide scheduling entirely when the cart contains excluded categories or products.
* Multiple pickup locations.
* A visual monthly Delivery Calendar in wp-admin showing order counts per day.
* Edit a saved date/time/location directly from the order edit screen.
* Weekday-wise delivery/pickup fee (classic checkout only — see FAQ).
* A "Delivery / Pickup" column on the WooCommerce Orders list.

= Where fields appear on the order =

The customer's chosen schedule is saved on the order and shows in the order edit screen, order emails, and the customer's My Account order view.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/daps-delivery-pickup-scheduler` directory, or install the .zip directly through the Plugins screen in WordPress (Plugins > Add New > Upload Plugin).
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to WooCommerce > Delivery & Pickup to configure hours, holidays, lead time, restrictions and pickup locations.
4. No further setup is needed — the plugin detects whether your checkout page uses the classic shortcode or the Block Checkout and shows the fields there automatically.

== Frequently Asked Questions ==

= Does this work with the WooCommerce Block Checkout? =

Yes. It uses WooCommerce's official Additional Checkout Fields API (available since WooCommerce 8.9) for the Block Checkout, and its own dedicated fields for the classic shortcode checkout. Both are supported automatically, no configuration needed.

= Why doesn't the delivery fee apply on the Block Checkout? =

On the classic checkout, WooCommerce recalculates cart totals using the same submitted field data this plugin reads, so the fee shown always matches what's charged. On the Block Checkout, totals are calculated by the Store API in a way that doesn't reliably expose this plugin's field value at that point — adding a fee there risks the displayed price not matching the final charge. Rather than risk that mismatch, the fee is classic-checkout-only for now.

= Can I limit how many orders are accepted per time slot? =

Yes — set "Max orders per time slot" in the settings. Once a slot reaches that many orders it's automatically hidden from the picker, and there's a server-side check in case two customers submit for the same last spot at the same moment.

= Can I stop delivery for certain areas, products, or small orders? =

Yes. You can restrict Delivery to specific WooCommerce shipping zones, require a minimum cart subtotal, and hide scheduling entirely when the cart contains excluded categories or products.

= Does this sync with Google Calendar? =

Not currently.

= Can customers leave a delivery tip? =

Not currently.

== Screenshots ==

1. Settings page: general options, restrictions, and weekly hours.
2. Delivery/Pickup fields on the checkout page.
3. Delivery Calendar in wp-admin.
4. Editable schedule box on the order edit screen.

== Changelog ==

= 1.0.0 =
* First public release. Includes: delivery/pickup date & time picker for both classic and Block Checkout; per-weekday hours, slot length, and holidays; minimum lead time and daily cutoff time; maximum orders per time slot; shipping-zone, cart-amount, and category/product restrictions; multiple pickup locations; a Delivery Calendar admin page; an editable schedule box on the order edit screen; a "Delivery / Pickup" column on the Orders list; and a weekday-wise delivery/pickup fee (classic checkout only).

== Upgrade Notice ==

= 1.0.0 =
First public release.

== Other Notes ==

Built from scratch — no code copied from any commercial plugin. Not yet included: outside-checkout shortcode/widget, Google Calendar sync, delivery tips, category-specific cutoff time, and the Block Checkout delivery fee (see FAQ for why).
