Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add_filter( 'wf_fedex_estimated_delivery', 'wf_add_delivery_time', 15, 20 );
function wf_add_delivery_time( $est_delivery_html, $est_delivery ) {
$days_to_add = 1;
if( isset($est_delivery['fedex_delivery_time']) ){
$new_date = strtotime( "+$days_to_add day", strtotime($est_delivery['fedex_delivery_time']) );
$new_date = date( apply_filters('wf_estimate_delivery_date_format', 'd-m-Y' ), $new_date );
$est_delivery_html = "<br /><small>".__('Est delivery: ', 'wf-shipping-fedex'). $new_date.'</small>';
}
return $est_delivery_html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.