WooCommerce Variation
Hi Experts!
I have a variable product in WooCommerce with three attributes:
- Color
- Size
- Mirror
I need to create a function in WordPress/WooCommerce that will generate all product variations based only on the “Size” attribute. For the “Color” and “Mirror” attributes, I want them to be set to “Any Color” and “Any Mirror,” respectively.
For example:
- 20cm x 50cm, Any Color, Any Mirror
This way, I only have to add the prices for these size-based variations manually, instead of creating each variation one by one.
Can someone help me with a code solution to automate this process?
Thank you!
I have tried ChatGPT but did not found reasonable solution