Updated: This can be done easily with this simple custom hooked function (code is commented):
add_action( 'woocommerce_before_calculate_totals', 'cart_items_shipping_class_message', 20, 1 );
function cart_items_shipping_class_message( $cart ){
if ( is_admin() && ! defined('DOING_AJAX') )
return;
## Your settings below ##
$shipping_class = 'bezorgservice'; // The targeted shipping class
$min_amout = 75; // The minimal amount
$amout_incl_tax = 0; // Initializing variable
// Loop through cart items
foreach( $cart->get_cart() as $cart_item ){
// Targeting our defined shipping class only
if( $cart_item['data']->get_shipping_class() === $shipping_class ){
// Add each subtotal from our defined shipping class only
$amout_incl_tax += $cart_item['line_subtotal'] + $cart_item['line_subtotal_tax'];
}
}
// Display an error notice when quantity count is below the minimum defined on cart page only
if( $amout_incl_tax > 0 && $amout_incl_tax < $min_amout && is_cart() ){
wc_clear_notices(); // Clear all other notices
// Display our custom notice
wc_add_notice( sprintf( 'Order <strong>%s</strong> more to deliver your order at home with our delivery service.',
wc_price($min_amout - $amout_incl_tax) ), 'notice' );
}
}
Code goes in function.php file of the active child theme (or active theme). Tested and works.