Since product category is a taxonomy, you could try the is_tax()
function. Check for the current category and then manipulate the data:
add_filter( 'woocommerce_get_price_html', 'custom_price_message' );
function custom_price_message( $price ) {
// Check the current category
if ( ! is_tax ( 'product_cat', 'category name or id here' ) {
$price .= ' <span class="price-text">' . __('with shipping').'</span>';
}
return $price;
}