Actions and Filters
WooCommerce Lead Time comes with some filters which allow you to customize the plugin's behavior.
Please note that this code is aimed at developers and if you don't know how to use it then you should ask your developer. If you don't have one, we recommend posting a job on Codeable. We have partnered with them to provide plugin customizations for our customers.
Filters
wclt_disable_default_output
Use this to disable the default output of the lead time on the single product page.
add_filter( 'wclt_disable_default_output', '__return_true' );
wclt_theme_compatibility_stock_escape
Use the filter to disable the escaping and sanitization of the stock status html. While this may be required for the majority of themes, some themes & plugins may need to add custom functionality with markup that is stripped out by wp_kses_post.
add_filter( 'wclt_theme_compatibility_stock_escape', '__return_false' );
wclt_lead_time_availability_output
Use this filter the change the actual HTML content shown in the availability section.
add_filter( 'wclt_lead_time_availability_output', function( $html_output, $lead_time ){
// Change the html content
return $html_output;
}, 10, 2 );
wclt_lead_time_stock_output
Use this filter the change the actual HTML content shown in the stock section.
add_filter( 'wclt_lead_time_stock_output', function( $html_output, $lead_time ){
// Change the html content
return $html_output;
}, 10, 2 );
wclt_lead_time_output
Use this filter the change the lead time shown for the products.
add_filter( 'wclt_lead_time_output', function( $lead_time ){
// Do something with the lead time
return $lead_time;
} );
wclt_lead_time_prefix_output
Use this filter the change the prefix shown for the lead time.
add_filter( 'wclt_lead_time_prefix_output', function( $prefix ){
// Do something with the prefix
return $prefix;
});