Code Snippets

The following filters allow developers to customize PRO-specific features without modifying plugin files. Add these snippets to your theme’s functions.php file or a custom plugin. For free plugin filters (lead time, cutoff time, working days, holidays, estimate text), see the EDD Free Code Snippets page.

zedd_pro_per_product_lead_time

Programmatically override the per-product lead time for a specific product or condition.

add_filter( 'zedd_pro_per_product_lead_time', function( $lead_time, $product ) {
    // Set a 7-day min lead time for a specific product ID
    if ( $product->get_id() === 123 ) {
        $lead_time['min'] = 7;
        $lead_time['max'] = 10;
    }
    return $lead_time;
}, 10, 2 );

zedd_pro_per_weekday_cutoff

Override the cutoff time for a specific day of the week programmatically.

add_filter( 'zedd_pro_per_weekday_cutoff', function( $cutoffs ) {
    // Override Friday's cutoff time to 11:00 AM
    $cutoffs['friday'] = '11:00';
    return $cutoffs;
} );

zedd_pro_transit_time

Override or modify the transit time returned by the active delivery provider.

add_filter( 'zedd_pro_transit_time', function( $transit, $origin, $destination ) {
    // Force a 2-day transit for a specific state/region
    if ( $destination['state'] === 'CA' ) {
        $transit['min'] = 2;
        $transit['max'] = 3;
    }
    return $transit;
}, 10, 3 );

zedd_pro_disable_analytics

Disable analytics tracking if you prefer not to collect impression and click data.

add_filter( 'zedd_pro_disable_analytics', '__return_true' );