How to import product lead times
WooCommerce Lead Time stores the lead time for each product either as a custom field on the 'products' post type. You can use this information to bulk import lead times to your store, instead of having to enter them manually. You can do this using any import plugin that supports custom fields, such as Product CSV Import Suite.
Individual products
The custom field name is _wclt_lead_time for individual products that do not have a dynamic lead time.
When the product has a dynamic lead time format assigned, the key used is _wclt_lead_time_date.
Variable products
The key _wclt_variation_lead_time is used for variations that do not have a dynamic lead time.
When the variation has a dynamic lead time format, the key used is _wclt_lead_time_date.
Lead time per stock status
When the option “Lead time per stock status” is enabled on the plugin settings page then the stock status is added to the slug as a suffix. For example:
- For static lead times, the key changes from
_wclt_lead_timeto_wclt_lead_time_instock. - For dynamic lead times, the key becomes
_wclt_lead_time_date_instock.
This is for both simple products and variable products.
Hiding the lead time
You can import the custom field _wclt_hide_lead_time to hide or show the lead time in bulk. Use the same key for simple products, variable parent products, and individual variations. There is no separate variation key. To set this by hand on one product, see Setting category, product & variation lead times.
- Use
yesto hide the lead time. - Use
noto show the lead time. - Set the key on a parent variable product to hide the lead time for all of its variations.
- The "Lead time per stock status" option does not affect this key. Do not add a per-stock-status suffix. One value covers every stock status.
- Importing is the only way to set this in bulk. Quick Edit and WooCommerce's bulk edit do not include this option.
Global and category lead times
Additionally, lead times can be set on the category and global level. If you'd like to import this data then it is stored as follows:
- As term meta for product categories with the meta_key of
wclt_lead_time. - As a site option with the option_name of
wclt_global_time.