Update: I was able to answer my own question with a function:
/*==========================================================================
= HIDE FREE SHIPPING LABEL IF PRODUCT CAT IS IN CART =
==========================================================================*/
add_action( 'wp_head' , 'custom_conditional_css_styles' );
function custom_conditional_css_styles(){
if( WC()->cart->is_empty() ) return; // We exit if cart is empty
// HERE your product category
$product_category = array(
'sasktel-apple-iphones',
'sasktel-smartphones',
'cell-phones',
'feature-phones',
'sasktel-apple-ipads'
);
$found = false;
// Loop through cart items checking for our product category
foreach ( WC()->cart->get_cart() as $cart_item ) {
if ( has_term( $product_category, 'product_cat', $cart_item['product_id'] ) ) {
$found = true;
break; // Found we stop the loop
}
}
if ( ! $found ) return; // If the product category is noy found we exit
// Here come your CSS styles
?>
<style>
.devnet_fsl-free-shipping {
display: none !important;
}
</style>
<?php
}