For Developers
Shortcode
Section titled “Shortcode”[wpify_woo_delivery_dates]
Section titled “[wpify_woo_delivery_dates]”Displays the delivery dates block at any location.
[wpify_woo_delivery_dates]Filters
Section titled “Filters”wpify_woo_delivery_dates_days
Section titled “wpify_woo_delivery_dates_days”Modifies the number of days for date calculation.
add_filter( 'wpify_woo_delivery_dates_days', function( $days, $product, $days_group ) { // Add extra day for heavy products if ( $product->get_weight() > 30 ) { return is_numeric( $days ) ? $days + 1 : $days; } return $days;}, 10, 3 );| Parameter | Type | Description |
|---|---|---|
$days | string/int | Number of days or text |
$product | WC_Product | Current product |
$days_group | array | Date group settings |
wpify_woo_delivery_dates_data
Section titled “wpify_woo_delivery_dates_data”Modifies data displayed in the dates block.
add_filter( 'wpify_woo_delivery_dates_data', function( $data ) { // Change date format $data['message'] = 'We ship on ' . $data['date']; return $data;} );| Parameter | Type | Description |
|---|---|---|
$data | array | date, message, more_info_label, more_info_text, shipping_methods, days_min, days_max, date_from, date_to, order_deadline, group |
wpify_woo_delivery_dates_shipping_table_line
Section titled “wpify_woo_delivery_dates_shipping_table_line”Modifies a row in the shipping methods table.
add_filter( 'wpify_woo_delivery_dates_shipping_table_line', function( $line_data, $method ) { // Add icon $line_data['title'] = '📦 ' . $line_data['title']; return $line_data;}, 10, 2 );| Parameter | Type | Description |
|---|---|---|
$line_data | array | title, price |
$method | WC_Shipping_Method | Shipping method object |
wpify_woo_delivery_dates_payment_table_line
Section titled “wpify_woo_delivery_dates_payment_table_line”Modifies a row in the payment methods table.
add_filter( 'wpify_woo_delivery_dates_payment_table_line', function( $line_data, $gateway ) { // Add fee if ( $gateway->id === 'cod' ) { $line_data['price'] = wc_price( 50 ); } return $line_data;}, 10, 2 );| Parameter | Type | Description |
|---|---|---|
$line_data | array | title, price |
$gateway | WC_Payment_Gateway | Payment method object |
wpify_woo_delivery_dates_payments_data
Section titled “wpify_woo_delivery_dates_payments_data”Modifies payment methods data.
add_filter( 'wpify_woo_delivery_dates_payments_data', function( $data ) { $data['message'] = 'Payment on delivery or by card'; return $data;} );| Parameter | Type | Description |
|---|---|---|
$data | array | message, more_info_label, more_info_text |
wpify_woo_delivery_dates_disable_country_select
Section titled “wpify_woo_delivery_dates_disable_country_select”Disables the country selector.
add_filter( 'wpify_woo_delivery_dates_disable_country_select', '__return_true' );Returns: bool - true to disable the selector
PHP API
Section titled “PHP API”get_delivery_date_data()
Section titled “get_delivery_date_data()”Returns the delivery date of a product for the first group visible in the customer’s shipping zone. Intended for integrations such as product feeds.
$module = wpify_woo_container() ->get( \WpifyWoo\Managers\ModulesManager::class ) ->get_module_by_id( 'delivery_dates' );
$data = $module->get_delivery_date_data( $product ); // customer's / store country$data = $module->get_delivery_date_data( $product, 'SK' ); // zone for Slovakia| Parameter | Type | Description |
|---|---|---|
$product | WC_Product | Product |
$country | string|null | Two-letter country code that selects the shipping zone. Without it, the customer’s shipping country or the store country is used. |
Returns an empty array when no group is visible, otherwise:
| Key | Type | Description | Example |
|---|---|---|---|
status | string | instock, outofstock, onbackorder | instock |
title | string | Block title | Delivery |
message | string | Message with the date, without HTML | Delivered on 02.10. |
date / specific_date | string | Formatted date, range or text value | 02.10.–06.10. |
score | int | Highest number of days (0 for a text value) | 3 |
days_min | int|null | Number of days (lower bound of a range); null for a text value | 1 |
days_max | int|null | Number of days (upper bound of a range); null for a text value | 3 |
date_from | string|null | Delivery date for days_min, Y-m-d | 2026-10-02 |
date_to | string|null | Delivery date for days_max, Y-m-d | 2026-10-06 |
order_deadline | string|null | Last moment to order for these dates, Y-m-d H:i in the site time zone; null without a cut-off time or for a text value | 2026-10-01 14:00 |
group | string | Group title | Courier |
Product Meta Data
Section titled “Product Meta Data”_wpify_woo_delivery_dates
Section titled “_wpify_woo_delivery_dates”Stores overridden date values for a specific product.
$delivery_data = get_post_meta( $product_id, '_wpify_woo_delivery_dates', true );
// Structure:// [// 'delivery_dates_UUID' => [// 'delivery_days_in_stock' => '1',// 'delivery_days_out_of_stock' => '7',// 'delivery_days_backorder' => '14',// ],// ]CSS Classes
Section titled “CSS Classes”| Class | Description |
|---|---|
.wpify-woo-delivery-date | Main container |
.wpify-woo-delivery-date__title | Block title |
.wpify-woo-delivery-date__line | Date row |
.wpify-woo-delivery-date__info | Extended information |
.wpify-woo-delivery-date__country-select | Country selector |
.wpify-woo-delivery-date__shipping-methods | Shipping table |
.wpify-woo-delivery-date__payments | Payment table |
REST API
Section titled “REST API”The module registers a REST API endpoint for AJAX updates when the country is changed.