Title: problem with Woocommerce variable
Last modified: March 29, 2022

---

# problem with Woocommerce variable

 *  Resolved [ali.k](https://wordpress.org/support/users/alikamali1988/)
 * (@alikamali1988)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/problem-with-woocommerce-variable/)
 * Hi my friends
    I created 2 Attributes in WooCommerce.(sale & color) The sales
   Attribute consists of 2 variations. (single sale & wholesale) I want the user
   who chose the (single sale) variable to be able to choose the colors.(This part
   has no problem) This is the problem > I want when the user selects a (wholesale),
   Disable the color variable and the user can not choose the color scheme. I put
   the site link and screenshots below. Thanks [screenshot](https://dinkysho.com/wp-content/uploads/2022/03/variations.jpg)
   [product single page](https://dinkysho.com/product/%DA%A9%DB%8C%D9%81-%D8%A2%D8%B1%D8%A7%DB%8C%D8%B4%DB%8C-%D8%B1%D9%88%D9%84%DB%8C/)
    -  This topic was modified 4 years, 2 months ago by [ali.k](https://wordpress.org/support/users/alikamali1988/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproblem-with-woocommerce-variable%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Prin a11n](https://wordpress.org/support/users/prin_settasatian/)
 * (@prin_settasatian)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/problem-with-woocommerce-variable/#post-15508794)
 * Hi there,
 * I understand you would like to let the customer choose the color when it’s a 
   single sale, and not let them choose the color when it’s wholesale.
 * Here is one way you can achieve this:
    1. In **Attributes**, create two attributes:
   a. type of sale (single and wholesale), b. color (red, green, blue, cannot choose
   color, etc. [feel free to add any color you want]).
 * 2. In **Variations**, add a **single** variation for every color except **cannot
   choose color**.
 * 3. In **Variations**, add a **wholesale** variation with only one option, **cannot
   choose color**.
 * This way, the customer can select any color when they choose single and cannot
   select the color when they choose wholesale.
 * ![](https://i0.wp.com/snipboard.io/94NnSu.jpg?ssl=1)
 * You can read more here: [https://woocommerce.com/document/variable-product/](https://woocommerce.com/document/variable-product/).
 * Let me know if you need further help.
 *  Plugin Support [Paulo P – a11n](https://wordpress.org/support/users/paulostp/)
 * (@paulostp)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/problem-with-woocommerce-variable/#post-15509121)
 * Hello [@alikamali1988](https://wordpress.org/support/users/alikamali1988/),
 * [@prin_settasatian](https://wordpress.org/support/users/prin_settasatian/) has
   suggested a good solution, but in case you’d like the “color” dropdown to disappear
   when “wholesale” is chosen, that will require custom code or a plugin.
 * For example, this plugin will allow you to show/hide fields based on customer
   selections: [https://woocommerce.com/products/extra-custom-product-options-for-woocommerce/](https://woocommerce.com/products/extra-custom-product-options-for-woocommerce/)
 * Hope this helps!
 *  Thread Starter [ali.k](https://wordpress.org/support/users/alikamali1988/)
 * (@alikamali1988)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/problem-with-woocommerce-variable/#post-15511223)
 * Thank you so much [@prin_settasatian](https://wordpress.org/support/users/prin_settasatian/)
 * thank you so much [@paulostp](https://wordpress.org/support/users/paulostp/)
 * your solutions very help me
 *  [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * (@rainfallnixfig)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/problem-with-woocommerce-variable/#post-15512229)
 * Great! It sounds those solutions can help achieve your desired result.
 * I’ll mark this thread as resolved now. If you have any further questions, I recommend
   creating a new thread.
 * Cheers.

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

The topic ‘problem with Woocommerce variable’ 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

 * [attributes](https://wordpress.org/support/topic-tag/attributes/)
 * [variable](https://wordpress.org/support/topic-tag/variable/)

 * 4 replies
 * 4 participants
 * Last reply from: [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/problem-with-woocommerce-variable/#post-15512229)
 * Status: resolved