\Barn2\Plugin\WC_Lead_TimeDisplay

This class handles the display of lead times in the WooCommerce store.

Summary

Methods
Properties
Constants
register()
maybe_add_lead_time_availability_text()
maybe_add_lead_time_stock_html()
get_lead_time()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
is_visible()
No private properties found
N/A

Methods

register()

register()

Register hooks and filters.

maybe_add_lead_time_availability_text()

maybe_add_lead_time_availability_text(string  $availability,\WC_Product  $product): string

Display lead time inside availability.

Parameters

string $availability
\WC_Product $product

Returns

string —

$availability

maybe_add_lead_time_stock_html()

maybe_add_lead_time_stock_html(string  $html,\Barn2\Plugin\WC_Lead_Time\WC_Product  $product): string

Display lead time if conditions are met

Parameters

string $html
\Barn2\Plugin\WC_Lead_Time\WC_Product $product

Returns

string —

$html

get_lead_time()

get_lead_time(\WC_Product  $product): string

Get the global or individual lead time for the product.

Parameters

\WC_Product $product

Returns

string

is_visible()

is_visible(\WC_Product  $product): boolean

Determine if lead time should be visible on the product.

Parameters

\WC_Product $product

Returns

boolean