woocommerce offtopic – variable product – force selection of first child attribute

I have a convertible product with three options:

  1. Product Type (3 in total)
  2. Product color (1 or 2 colors per product)
  3. Product Engine (Normal or Pro)

Problem:,

Variable product images do not appear until the user selects a product type and then a product color. I need the first color to be selected by default for each product when the user selects product A, B or C.

Product A = Color A1 or A2
Product B = Color B1 or B2
product c = color c1

Question:
What is the best way to force the colors A1, B1 and C1 to be selected when each related product type is selected?

Here is a demo video I made to make the problem easier to understand:
https://www.dropbox.com/s/bz3kvr4cl7fwygq/force-attribute-selection.mp4?dl=0

Leave a Comment