Title: Reset variable on click
Last modified: December 9, 2020

---

# Reset variable on click

 *  Resolved [dbsoft](https://wordpress.org/support/users/dbsoft/)
 * (@dbsoft)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/reset-variable-on-click/)
 * Hello i have product with two attributes. Can i reset-clear all variables when
   customer clicks one?

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

 *  [Siew](https://wordpress.org/support/users/kosiew/)
 * (@kosiew)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/reset-variable-on-click/#post-13768639)
 * Hi there,
 * > .. have product with two attributes. Can i reset-clear all variables when customer
   clicks one?..
 * I want to make sure I understand you correctly.
    Can you tell me more which variables
   will be reset?
 * Can you give an example, with screenshot if appropriate, to illustrate your question?
 *  Thread Starter [dbsoft](https://wordpress.org/support/users/dbsoft/)
 * (@dbsoft)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/reset-variable-on-click/#post-13769586)
 * Yes ofc.[](https://dbsoft.info/product/%cf%86%cf%81%ce%bf%ce%bd%cf%84%ce%b9%cf%83%cf%84%ce%ae%cf%81%ce%b9%ce%bf)
 * In this Link,i want when someone clicks on the first attribute automatically 
   reset second one.(so i have all the options on first)
 * [https://dbsoft.info/product/%cf%86%cf%81%ce%bf%ce%bd%cf%84%ce%b9%cf%83%cf%84%ce%ae%cf%81%ce%b9%ce%bf](https://dbsoft.info/product/%cf%86%cf%81%ce%bf%ce%bd%cf%84%ce%b9%cf%83%cf%84%ce%ae%cf%81%ce%b9%ce%bf)
    -  This reply was modified 5 years, 6 months ago by [dbsoft](https://wordpress.org/support/users/dbsoft/).
 *  [Siew](https://wordpress.org/support/users/kosiew/)
 * (@kosiew)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/reset-variable-on-click/#post-13774438)
 * hi [@dbsoft](https://wordpress.org/support/users/dbsoft/) ,
 * For this purpose, please refer to the “Manually Add a Variation” section at [https://docs.woocommerce.com/document/variable-product/#manually-adding-a-variation](https://docs.woocommerce.com/document/variable-product/#manually-adding-a-variation)
   to add only valid combinations.
 *  Plugin Support [abwaita a11n](https://wordpress.org/support/users/abwaita/)
 * (@abwaita)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/reset-variable-on-click/#post-13808577)
 * Hi [@dbsoft](https://wordpress.org/support/users/dbsoft/),
 * We’ve not heard back from you in a while, so I’m marking this thread as resolved.
   Hopefully, you got the solution to your problem!
 * If you have further questions, please feel free to open a new topic.
 * Thanks.

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

The topic ‘Reset variable on click’ 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/)

 * 4 replies
 * 3 participants
 * Last reply from: [abwaita a11n](https://wordpress.org/support/users/abwaita/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/reset-variable-on-click/#post-13808577)
 * Status: resolved