=== Delivery Date Cutoff Estimator ===
Contributors: arrivalpromise
Tags: delivery date, estimated delivery, shipping, woocommerce, cutoff
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show "order now, get it by" delivery dates on WooCommerce product pages and cart, with a same-day dispatch cutoff and closed days.

== Description ==

Customers buy faster when they know when the parcel arrives. Delivery Date Cutoff Estimator calculates a realistic delivery window from your own dispatch routine and shows it where buying decisions happen.

**Free features**

* Same-day dispatch cutoff time (in your site timezone).
* Handling time and default transit time (min–max working days).
* Dispatch days and carrier delivery days – weekends and closed days are skipped automatically.
* Estimate on single product pages (classic and block themes).
* Estimate row in the cart and checkout totals (classic and block cart/checkout).
* Per-product extra handling days (made to order, pre-order) and a per-product "hide" switch.
* The promised date is stored on every order and shown on the order admin screen, order received page and My Account.
* Editable texts with placeholders: {date_range}, {date_min}, {date_max}, {ship_date}, {ship_day}.
* Shortcode `[pmw1tdcnd_estimate]` or `[pmw1tdcnd_estimate product_id="123"]` for any page.
* Live preview in the settings screen: "if a customer orders right now".
* HPOS (custom order tables) compatible.

The free plugin does not contact any external service.

Delivery Date Cutoff Estimator Pro adds transit times per WooCommerce shipping zone and shipping method, a holiday calendar with one-off and yearly closed dates, the estimated delivery date in WooCommerce order emails, and a live cutoff countdown ("Order within 2h 15m to ship today"). Upgrade from the Delivery Estimates settings screen.

== Installation ==

1. Install and activate WooCommerce.
2. Upload the plugin folder to `/wp-content/plugins/` or install it from the Plugins screen, then activate it.
3. Go to WooCommerce → Delivery Estimates.
4. Set your cutoff time, handling time, transit days and dispatch days. Check the live preview and save.

== Frequently Asked Questions ==

= Which timezone is used for the cutoff? =

The timezone set under Settings → General. The settings screen shows the current site time so you can double-check.

= How is the date calculated? =

Orders placed before the cutoff on a dispatch day count for that day; later orders count for the next dispatch day. Handling days are added on dispatch days, then transit days are added on carrier delivery days. Holidays (Pro) are skipped in both steps.

= Can one product take longer than others? =

Yes. Edit the product, open the Shipping tab and set "Extra handling days". In the cart the slowest product decides the date.

= Does it work with the block cart and checkout? =

Yes. The estimate is shown above the cart and checkout blocks, and saved to orders placed through the block checkout.

= I use a page cache. Is the date still correct? =

Dates are calculated when the page is generated. If your cache keeps pages longer than a day, exclude product pages or lower the cache lifetime. The countdown hides itself once the cutoff has passed.

= Will uninstalling delete my data? =

Deleting the plugin removes its settings, holidays, rules table and product settings. Dates already stored on orders are kept so your order history stays accurate.

== Screenshots ==

1. Delivery estimate on a product page.
2. Estimated delivery row in the cart totals.
3. General settings with the live "if a customer orders right now" preview.
4. Zone and shipping method rules (Pro).
5. Holiday calendar (Pro).

== Changelog ==

= 1.0.1 =
* Cleaner admin menu (no separate Contact Us item).

= 1.0.0 =
* First release.
