Fixed optionally-plant-card by changing if-statement to when-statement