Code Snippets

The following filters allow developers to customize the delivery estimate calculation and display without modifying plugin files. Add these snippets to your theme’s functions.php file or a custom plugin.

zedd_lead_time

Modify the lead time (in business days) for a specific product.

add_filter( 'zedd_lead_time', function( $lead_time, $product ) {
    // Double the lead time for products in the 'heavy-items' category
    if ( has_term( 'heavy-items', 'product_cat', $product->get_id() ) ) {
        $lead_time['min'] = $lead_time['min'] * 2;
        $lead_time['max'] = $lead_time['max'] * 2;
    }
    return $lead_time;
}, 10, 2 );

zedd_cutoff_time

Override the daily order cutoff time programmatically.

add_filter( 'zedd_cutoff_time', function( $cutoff ) {
    // Set cutoff to 12:00 PM
    return '12:00';
} );

zedd_working_days

Modify which days of the week are treated as working days.

add_filter( 'zedd_working_days', function( $days ) {
    // Remove Saturday from working days
    return array_diff( $days, array( 'saturday' ) );
} );

zedd_holidays

Add or modify the list of holiday dates programmatically. Dates must be in YYYY-MM-DD format.

add_filter( 'zedd_holidays', function( $holidays ) {
    $holidays[] = '2025-12-25'; // Christmas Day
    $holidays[] = '2025-01-01'; // New Year's Day
    return $holidays;
} );

zedd_estimate_text

Customize the full delivery estimate message displayed to customers.

add_filter( 'zedd_estimate_text', function( $text, $min_date, $max_date, $product ) {
    return 'Ships between ' . $min_date . ' and ' . $max_date;
}, 10, 4 );