1. Knowledge Base
  2. WooCommerce Lead Time
  3. Developer Documentation

Template functions

WooCommerce Lead Time comes with a number of template functions which developers can use to customize the plugin.

wclt_get_lead_time

This function can be used in your theme or plugin to retrieve the lead time for a specific product, passing the product as an argument.

Arguments

WC_Product $product – The product object you wish to retrieve the lead time for.

Return

String – The full lead time string include the prefix which is set in the global settings.

Example
$product = wc_get_product( get_the_ID() );
$lead_time = wclt_get_lead_time( $product );
Still need help?
If searching the knowledge base hasn't answered your question, please contact support.

Related Articles