Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
Woocommerce, force color selection on variations

Would anybody know the code for functions.php for this?

I have a product. It has three colors and comes with three sizes. I've already added code to allow color to be selected and change the corresponding variation image without having to select size. Step 1. Done.

Next I want to FORCE variations to always be selected. In the product tab, I can set the 'default color and default size' to a specific variation. This is ok, but i can still DESELECT the current selected color (meaning, all off the image gallery gets shown). What I need is to make sure that the customer cannot deselect any swatch/variation on the color selection, and instead, can only choose another color.

To clarify, it would behave like Zara's website. You can see, when selecting color, you cannot deselect a color and instead simply changes the variation images according to which one is selected. Note that a size doesn't have be selected for this either atmo.

https://www.zara.com/us/en/premium-cotton-shirt-p04174015.html?v1=172577525&v2=2025627

I also want to remove 'choose an option' completely ideally. Any solutions?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!