=== WooCommerce Lead Time ===
Contributors: barn2media
Tags: woocommerce, lead time, stock
Requires at least: 6.1
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 2.2.1
License: GNU General Public License v3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Provide individual and global lead times for your WooCommerce products.

== Description ==

The WooCommerce Lead Time plugin lets you set a lead time either globally or for individual products.

The lead time is displayed on the single product page as follows:

 * Above the quantity and add to cart button.
 * If stock is being managed then it will appear immediately after the stock status.

You can choose to display for any or all of the following stock statuses:

 * In stock products
 * Out of stock products
 * Products on backorder

== Installation ==

1. Download the plugin file from the Order Confirmation email or the [account area](https://barn2.com/account/).
1. In the WordPress Dashboard, go to Plugins -> Add New -> Upload and select the ZIP file you just downloaded.
1. Activate the plugin.
1. Next, enter your license key under WooCommerce -> Settings -> Products -> Lead time.
1. Configure the global lead time options on this page. Add or override lead times for individual products on the Edit Product screen (under the Inventory tab).

== Frequently Asked Questions ==

Please refer to our [support page](https://barn2.com/support-center/).

== Changelog ==

= 2.2.1 =
Release date 10 February 2026

* Fix: Lead time was not saved for variations

<!--more-->

= 2.2.0 =
Release date 20 January 2026

* New: Added the lead time block to the block editor
* Tweak: Show the lead time for shortcodes when the "Product Lists" option is checked
* Dev: Updated internal libraries and tested up to WooCommerce 10.4.3 and WordPress 6.9
* Dev: Improved the security and added the missing nonce

= 2.1.6 =
Release date 12 September 2025

* Dev: Updated internal libraries and tested up to WooCommerce 10.1.2
* New: Added translation files
* Fix: Lead time prefix was required for admin orders

= 2.1.5 =
Release date 23 April 2025

* Dev: Updated internal libraries
* Dev: Tested up to WordPress 6.8 and WooCommerce 9.8.2

= 2.1.4 =
Release date 02 April 2025

* Dev: Tested up to WordPress 6.7.2 and WooCommerce 9.7.1
* Dev: Upgraded to React 19
* Fix: Dynamic date was not saving for the categories

= 2.1.3 =
Release date 26 November 2024

* Dev: Added a filter for the static time unit
* Dev: Tested up to WordPress 6.7.1 and WooCommerce 9.4.2
* Dev: Added the static time unit
* Dev: Added the uninstall file
* Fix: WooCommerce checks was wrong in the delivery_slots integration
* Fix: Longest lead time was wrong in delivery_slots integration

= 2.1.2 =
Release date 18 June 2024

* Dev: Updated internal libraries
* Dev: Tested up to WordPress 6.5.4 and WooCommerce 8.9.2
* Fix: The lead time was not showing in the Motta theme
* Fix: Lead time date was not showing in other languages

= 2.1.1 =
Release date 23 January 2024

* Dev: Tested up to WordPress 6.4.2 and WooCommerce 8.5.1
* Dev: Deleted the lead time from Grouped and External products
* Fix: HTML displayed in the lead time text in Astra theme
* Fix: Duplicated lead time message in orders

= 2.1.0 =
Release date 6 November 2023

* New: Added the `[lead_time]` shortcode
* New: Show the dynamic lead time as exact date
* New: Choose the units (days, weeks, months) in the dynamic lead time
* Dev: Added some hooks to modify the lead time and prefix
* Dev: Tested up to WordPress 6.3.2 and WooCommerce 8.2.1
* Dev: Updated internal libraries and classes
* Fix: Correctly format the lead time when manually added to order

= 2.0.17 =
Release date 5 September 2023

* New: Added German translation
* Dev: Tested up to WordPress 6.3.1 and WooCommerce 8.0.3
* Dev: Upgraded to the composer version of barn2-lib
* Dev: Added HPOS compatibility
* Dev: Added custom fields to the WPML config file

= 2.0.16 =
Release date 1 August 2023

* Dev: Tested up to WordPress 6.2.2 and WooCommerce 7.9.0.
* Dev: Added security policy
* Fix: Call to a member function on bool resulting uncaught error.

= 2.0.15 =
Release date 20 March 2023

* Fix: manually adding products to an order skipped the visibility checks.
* Fix: wrong label used for an option of the "Display lead times for" setting inside the setp wizard.

= 2.0.14 =
Release date 07 March 2023

* Fix: fatal error when adding fees while editing an order.

= 2.0.13 =
Release date 30 January 2023

* Fix: lead time re-added each time an order is modified.

= 2.0.12 =
Release date 16 January 2023

* New: generate lead time metadata when manually creating orders.
* Dev: tested up to WooCommerce 7.3

= 2.0.11 =
Release date 28 November 2022

 * New: added setup wizard.

= 2.0.10 =
Release date 09 November 2022

 * Fix: date picker not working in WordPress 6.1.
 * Fix: styling of date picker is broken in WordPress 6.1.
 * Fix: styling of inputs of labels powered by WP's React components is broken in WordPress 6.1.
 * Tweak: changed name of WPT 'lead-time' column.  

= 2.0.9 =
Release date 24 October 2022

 * Fix: compatibility with the Iconic Delivery Slots plugin.

= 2.0.8 =
Release date 28 May 2022

 * Fix: broken date formatting when initialising the datepicker in the admin panel in WP 6.0.
 * Tweak: updated javascript dependencies.
 * Tweak: updated Barn2 libraries.
 * Dev: tested up to WordPress 6.0 and WooCommerce 6.5

= 2.0.7 =
Release date 28 February 2022

 * Fix: date picker did not appear when creating a variation.
 * Fix: dynamic lead time date would not display the "years" if available.
 * Tweak: updated language files.

= 2.0.6 =
Release date 23 February 2022

 * Fix: lead time format retrieved for variations did not take in consideration the parent product format.
 * Fix: the placeholder for the lead time input in variations, displayed the timestamp instead of a formatted date.
 * Tweak: allow display of the lead time when doing a REST request.
 * Tested up to WooCommerce 6.2

= 2.0.5 =
Release date 03 February 2022

 * Tweak: updated composer configuration to no longer check platform requirements.
 * Tested up to WooCommerce 6.1 and WordPress 5.9

= 2.0.4 =
Release date 15 November 2021

 * Fix: themes compatibility filters firing too early that they could not be filtered.

= 2.0.3 =
Release date 03 November 2021

 * Fix: unable to remove the lead time set in the category.
 * Fix: unable to remove the lead time set in the category on a per stock status basis.
 * Dev: updated library code.
 * Tested up to WooCommerce 5.9.

= 2.0.2 =
Release date 14 October 2021

 * Tweak: Added Italian translation & updated language files.
 * Tweak: Adjusted how the dynamic lead time date is calculated.
 * Fix: An issue where the dynamic lead time date was showing the wrong amount of days remaining.
 * Tested up to WooCommerce 5.8.

= 2.0.1 =
Release date 04 October 2021

 * Tweak: Adjusted spacing of lead time within the shop/category pages for certain themes.
 * Tweak: Lead time on shop/category pages for variable products has been hidden.
 * Fix: Global lead time prefix not appearing under certain conditions.
 * Fix: With the "Lead time per stock status" setting enabled, the wrong global prefix was being displayed under certain conditions.
 * Fix: Variable products with stock managed at parent product level & at variation level, would display the wrong lead time.
 * Fix: Variable products with stock managed at parent product level & at variation level, would not display the lead time from the assigned category.

= 2.0.0 =
Release date 27 September 2021

 * New: Display lead time on shop & category pages.
 * New: Added support for dynamic lead times.
 * New: Added support for lead times per stock status.
 * Tweak: Updated WPML compatibility configuration file.
 * Dev: added filter to disable the built-in theme-specific template overrides.
 * Tested up to WooCommerce 5.7.

= 1.5.4 =
Release date 20 July 2021

 * New: Added support for WooCommerce Discontinued Products plugin.
 * Dev: updated library code.
 * Tested up to WordPress 5.8 and WooCommerce 5.5.

= 1.5.3 =
Release date 20 April 2021

 * New: Added support for new navigation menus in WooCommerce Admin feature plugin.
 * Tweak: Stopped forcing lowercase output on translated lead time unit strings.
 * Tested up to WordPress 5.7 and WooCommerce 5.2.2.

= 1.5.2 =
Release date 19 January 2021

 * Tweak: Connect display stock options to all new lead time areas and WooCommerce Product Table.
 * Tweak: Support new and old versions of WooCommerce Product Table.
 * Dev: Add Composer project type.
 * Tested up to WooCommerce 4.9.

= 1.5.1 =
Release date 18 December 2020

 * Tweak: Better handling of item meta when no global prefix is present.

= 1.5 =
Release date 17 December 2020

 * New: Options to show the lead time on the single product, cart, checkout, and order details.
 * Fix: Conflict between saving product and variation lead times.
 * Tweak: Made it possible to save an empty category lead time value.
 * Tested up to WordPress 5.6 and WooCommerce 4.8.

= 1.4.1 =
Release date 1 October 2020

 * Tweak: Use WooCommerce CRUD functions for variation meta.
 * Tweak: Theme compatibility for Astra and Porto, as well as a generic fallback for <span> elements being displayed in the lead time output.

= 1.4 =
Release date 10 July 2020

 * New: New feature to set lead times for entire categories.
 * New: New function to retrieve the lead time.

= 1.3.1 =
Release date 7 July 2020

 * Tested up to WooCommerce 4.3 and WordPress 5.4.2.

= 1.3 =
Release date 3 June 2020

 * New: New option to set the lead time unit and display this after the lead time.

= 1.2 =
Release date 17 April 2020

 * New: Tested up to WooCommerce 4.1.
 * Tweak: Minor improvements to settings page.
 * Dev: Added new plugin license system and refactored some classes.

= 1.1.2 =
Release date 12 March 2020

 * Tested up to WooCommerce 4.0 and WordPress 5.4.

= 1.1.1 =
Release date 21 January 2020

 * Fully tested with WordPress 5.3.2 and WooCommerce 3.9.

= 1.1 =
Release date 17 December 2019

 * New: New option to add lead times for individual variations.

= 1.0.1 =
Release date 30 October 2019

 * Tested up to WordPress 5.3 and WooCommerce 3.8.
 * Update library code.

= 1.0 =
Release date 11 September 2019

* Initial release.