Show remaining amount to reach free shipping threshold

add_action( 'woocommerce_before_cart', 'kp_wc_free_shipping_notice' );
 function kp_wc_free_shipping_notice() {
 $min_amount = 100; //change this to your free shipping threshold
 $current = WC()->cart->subtotal;
 if ( $current < $min_amount ) {
       $added_text = 'Get free shipping if you order ' . wc_price( $min_amount - $current ) . ' more!';
       $return_to = wc_get_page_permalink( 'shop' );
       $notice = sprintf( '%s %s', esc_url( $return_to ), 'Continue Shopping', $added_text );
       wc_print_notice( $notice, 'notice' );
    }
 }