I would like to hide the color option if there is only one variant for color.
let say, my product have only blue color, then no need to show color variants , but if there is blue and red, it shows for customer to choose.
Can you help to code this condition ?
Solved! Go to the solution
This is an accepted solution.
The following post will help you to do a hide variant dropdown.
Hope this helps.