Disable Woocommerce blocking variations

  php, woocommerce, wordpress

I got a woocommerce variable product which contains two variables: „Material“ and „Color“

In Material1 I got Color 1,2,3 and in Material2 Color 4,5,6

Scenario: When choosing Material1 I got displayed just color 1,2,3 (I hide the disabled colors using css)

The problem now is that I can’t choose Material2 anymore, because it’s disabled because Color 1,2,3 are not available in Material2

I just can reset the selection, but then nothing is selected anymore and all colors are displayed (which I don’t want, I just want to have the colors displayed based on the material)

The solution I’m searching for is that I’m able to click the disabled Material2 (from above scenario) and the color selection gets reseted and shows the colors related to Material2

Any solutions for that ?

Source: Ask PHP

LEAVE A COMMENT