I have a Commerce product and there are two price fields. (Original price and Sale price). I would like to display original price as line-through text when sale price is available. Therefore I would like to add a custom class to a field based on another field value(boolean), I looked at this function, hook_entity_view_alter, but I don't know whether it will be good.
Anyone has idea how do I solve this?