=== EDDV Notices for WooCommerce ===
Contributors: rwky
Donate link: https://www.paypal.me/eduardvd
Tags: woocommerce, delivery date, estimated delivery, vacation notice, shipping notice
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
WC requires at least: 7.9
WC tested up to: 10.4
Stable tag: 1.1
Requires Plugins: woocommerce
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display Estimated Delivery Date ranges or a Vacation Notice across WooCommerce pages and emails with flexible templates and automatic mode switching.

== Description ==

Estimated Delivery Date and Vacation Notices for WooCommerce allows store owners to display dynamic delivery estimates or vacation notices across WooCommerce pages and emails.

The plugin automatically switches between **estimated delivery mode** and **vacation mode** based on a configured date, using server-side logic and WordPress timezone settings.

It is designed to be lightweight, flexible, and fully compatible with modern WooCommerce setups, including High-Performance Order Storage (HPOS).

### Key features

* Automatic mode switching (delivery / vacation)
* Business-day delivery calculation (Monday–Friday)
* Configurable delivery intervals (store-wide)
* Fully customizable message templates with placeholders
* Optional display on:
  * Product pages
  * Cart page
  * Checkout page
  * WooCommerce emails
* Multiple WooCommerce locations selectors per display area
* Language-aware date formatting based on installed WordPress languages
* HPOS-compatible
* No JavaScript dependencies
* No external libraries

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Go to **WooCommerce → Settings → EDDV Notices**
4. Configure delivery intervals, templates, and display locations then save.

== Configuration ==

### Delivery mode

When no vacation date is set (or the date is in the past), the plugin displays an estimated delivery range calculated using the standard business days (mon-fri) based on the intervals.

### Vacation mode

When a vacation start date is set to today or a future date, the plugin automatically switches to vacation mode and displays the configured vacation notice.

### Message templates

Templates support placeholders:

* `{start_date}` – delivery start date
* `{end_date}` – delivery end date
* `{vacation_date}` – vacation processing start date

Basic HTML is supported in templates (for example `<strong>`, `<br>`, `<em>`).

== Frequently Asked Questions ==

= My WordPress local time is wrong, how can I fix it? =
Go to WordPress Admin > Settings > General - change your "Timezone" setting.

= How can I clear vacation mode? =
Open the datepicker from the date field in the plugin settings, select "clear" and save.

= Does this plugin affect checkout performance? =
No. All calculations are server-side and lightweight. No JavaScript or AJAX is used.

= Is the plugin compatible with HPOS? =
Yes. The plugin explicitly declares compatibility with WooCommerce High-Performance Order Storage yet it does not need it, but it was required.

= Can I control where the message appears? =
Yes. You can enable or disable the notice per area and choose from multiple native WooCommerce hooks.

= Does it support multiple languages? =
The plugin formats dates based on the selected WordPress language. Text strings are translatable.

== Screenshots ==

1. WooCommerce EDDV Notices settings panel.
2. Estimated delivery notice displayed on the product page.
3. Vacation notice example.
4. Example of the notice displayed in WooCommerce emails.

== Changelog ==

= 1.1 =
* New: optional "Exclude virtual products" setting that hides the notice on virtual product pages and on carts, checkouts and emails containing only virtual products. Mixed carts (at least one shippable item) still show the notice.

= 1.0 =
* Initial public release
* Estimated delivery calculation
* Vacation notice mode
* Template-based messages
* WooCommerce settings integration
* HPOS compatibility

== Upgrade Notice ==

= 1.1 =
Adds an optional setting to hide the notice when the rendering context contains only virtual products.

= 1.0 =
Initial release.