Delivery_Slots implements Registerable

Provides integration of WLT with the Delivery slots plugin by Iconic.

While the Iconic's plugin already provides integration with WLT, their current integration only supports static lead times.

Because version 2.0+ of WLT adds support for dynamic lead times, we need to disable their filter 'iconic_wds_min_delivery_date', and attach our new custom logic.

Majority of the code is borrowed from Iconic's integration, the code has been adapted to support the new metadata and options.

Interfaces, Classes and Traits

Registerable
An object that can be registered with WordPress via the Plugin API, i.e. add_action() and add_filter().

Table of Contents

get_lead_time_units()  : mixed|string|void
Get lead time units.
get_longest_lead_time_date()  : mixed
get_product_lead_time()  : bool|int
Get product lead time.
register()  : void
Register this object with WordPress.
set_min_delivery_date()  : mixed

Methods

get_lead_time_units()

Get lead time units.

public static get_lead_time_units() : mixed|string|void
Return values
mixed|string|void

get_longest_lead_time_date()

public static get_longest_lead_time_date() : mixed
Return values
mixed

get_product_lead_time()

Get product lead time.

public static get_product_lead_time(WC_Product $product) : bool|int
Parameters
$product : WC_Product

Product.

Return values
bool|int

register()

Register this object with WordPress.

public register() : void
Return values
void

set_min_delivery_date()

public set_min_delivery_date([mixed $data = array() ]) : mixed
Parameters
$data : mixed = array()
Return values
mixed

Search results