Title: Nested Variation
Last modified: May 17, 2022

---

# Nested Variation

 *  Resolved [jhez03](https://wordpress.org/support/users/jhez03/)
 * (@jhez03)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/nested-variation/)
 * Hi there.
 * I am creating a product with 2 Variations ( Black and White)
    then another variation
   for each color. For example: A user clicks on variation Black, then a new variation
   should appear below the black variation. Black -A1 Black -A2 Black -A3 Black 
   Same goes for white. and the user should only be able to choose between black
   or white. I can’t seem to achieve that. Please guide me to the right direction.
   Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Igor H](https://wordpress.org/support/users/ihereira/)
 * (@ihereira)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/nested-variation/#post-15654866)
 * Hello there,
 * As an alternative solution you can combine variations with attributes, please
   check the tutorial below:
 * [How to Create Complex Variations](https://www.youtube.com/watch?v=IU7tgkH5Puk)
 * I hope this points you in the right direction.
 *  Thread Starter [jhez03](https://wordpress.org/support/users/jhez03/)
 * (@jhez03)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/nested-variation/#post-15654926)
 * Hi, thank you for the quick response.
    So I checked the video, however it’s different
   to what I was aiming for.
 * In the tutorial, you have to select at least 1 attributes to each variation in
   order to add it to cart.
 * What I want is close from the tutorial, but I want the variation to be independent
   from each other.
    For example: I have 2 variations, Size and Color (black & white
   in my case) , I want the user to just select 1 variant from Size without the 
   need of selecting another variants from Color.
 *  [Mashi](https://wordpress.org/support/users/shaonback2/)
 * (@shaonback2)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/nested-variation/#post-15654989)
 * Hello [@jhez03](https://wordpress.org/support/users/jhez03/)!
 * > I have 2 variations, Size and Color (black & white in my case) , I want the
   > user to just select 1 variant from Size without the need of selecting another
   > variants from Color.
 * You can try the suggestions of this thread to accomplish this. 👉 [https://stackoverflow.com/a/67065952/10955218](https://stackoverflow.com/a/67065952/10955218)
   
   When you do that make sure to set the color as an optional attribute.
 * —
 * Please note that we provide no warranty or support for custom code or 3rd party
   plugins (meaning we can not help you further with this code snippet). Use them
   at your own risk.
    **Also: Before you do that, please do make a full backup!**
 * You can add this code to your child theme’s functions.php file or via a plugin
   that allows custom functions to be added, such as the [Code Snippets](https://wordpress.org/plugins/code-snippets/)
   plugin.
 * I hope it helps.
 *  Thread Starter [jhez03](https://wordpress.org/support/users/jhez03/)
 * (@jhez03)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/nested-variation/#post-15656199)
 * Hello!
 * Thank you for this. I think this is the one I’m looking for.
    I appreciate both
   your help.
 * Cheers!
 *  [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * (@margaretwporg)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/nested-variation/#post-15656306)
 * Glad you found what you were looking for. 🙂
 * I’m going to mark this thread as resolved.
 * Feel free to create another topic if you have any other questions.
 * Thanks

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Nested Variation’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [nested](https://wordpress.org/support/topic-tag/nested/)
 * [product](https://wordpress.org/support/topic-tag/product/)
 * [variations](https://wordpress.org/support/topic-tag/variations/)

 * 5 replies
 * 4 participants
 * Last reply from: [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/nested-variation/#post-15656306)
 * Status: resolved