In WooCommerce use the code below to add a custom label after product prices in simple and variables products:
add_filter(\'woocommerce_variation_price_html\
It should'nt be 'case' it should 'Case', strstr is a case sensitive function and as it is boolean the below statment will return false always. Because the values in ur selector is Case (20 dozens) not case (20 dozens) See the reference below to know more.
Thus change the below line:
$has_case = strstr($last_variation_attribute_slug_value, 'case');
to:
$has_case = strstr($last_variation_attribute_slug_value, 'Case');
ref: https://www.w3schools.com/php/func_string_strstr.asp