Add this code snippet to your site and it will disable the day fees when the user selects the Free Shipping method.
You can add this code to the functions.php of your active child theme or you can use the Code Snippet plugin.
<?php
/**
* Iconic WDS - remove day fees if free shipping is selected.
*
* @return void
*/
function iconic_wds_remove_day_fees() {
global $iconic_wds;
if ( empty( $iconic_wds ) ) {
return;
}
$chosen_shipping_methods = WC()->session->get( 'chosen_shipping_methods' );
if ( ! isset( $chosen_shipping_methods[0] ) ) {
return;
}
$chosen_shipping_method = $chosen_shipping_methods[0];
if ( false !== strpos( $chosen_shipping_method, 'free_shipping' ) ) {
WC()->session->__unset( 'jckwds_day_fee' );
}
}
add_action( 'woocommerce_checkout_update_order_review', 'iconic_wds_remove_day_fees', 11 );