Title: conditional in attribute
Last modified: April 22, 2020

---

# conditional in attribute

 *  [debora rojas](https://wordpress.org/support/users/debora30/)
 * (@debora30)
 * [6 years ago](https://wordpress.org/support/topic/conditional-in-attribute/)
 * Hello, I have a problem that I do not know how to solve. I would appreciate it
   if someone help me. I have 1 product with 45 variations and 4 attributes, in 
   the 30 variations the 4 attributes apply, the others only comply with 3, I want
   the other 15 variations to not show the 4 attribute, any ideas?

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

 *  [linux4me2](https://wordpress.org/support/users/linux4me2/)
 * (@linux4me2)
 * [6 years ago](https://wordpress.org/support/topic/conditional-in-attribute/#post-12715747)
 * By default, the variations threshold is 30. If the number of variations is less
   than the threshold, WooCommerce uses AJAX to check the available variations and
   the customer is only able to select available variations. If the number of variations
   is greater than the threshold, AJAX isn’t used, and variations that aren’t available
   will be displayed.
 * If you have more than 30 variations for a product, you can increase the threshold
   by adding the following code to your child theme’s functions.php, replacing the“
   150” with whatever you need, but keeping in mind the higher the number, the more
   resource-intensive the AJAX call:
 *     ```
       add_filter( 'woocommerce_ajax_variation_threshold', 'wc_ajax_variation_threshold' );
       function wc_ajax_variation_threshold() {
           return 150;
       }
       ```
   
 *  Thread Starter [debora rojas](https://wordpress.org/support/users/debora30/)
 * (@debora30)
 * [6 years ago](https://wordpress.org/support/topic/conditional-in-attribute/#post-12718453)
 * hello, actually I don’t mean the options available for each variation, I mean
   the attributes front-end example
    product1 pa_attribute 1 (op1, op2) pa_attribute
   2 (op1, op2) pa_attribute 3 (op1, op2) what I want is that when **pa_attribute
   1 (op1)** is chosen, **pa_attribute 3** is not displayed

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

The topic ‘conditional in attribute’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [debora rojas](https://wordpress.org/support/users/debora30/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/conditional-in-attribute/#post-12718453)
 * Status: not resolved