title: Validating input quantity for a specific category woocommerce
body: <p>I'm trying to validate input quantity for a specific &quot;Mushroooms&quot; Category, However the validation doesn't work for that specific category. It works for all of categories. I'm trying to use min quantity (1) and max quantity (2) only for &quot;Mushroooms&quot; Category. But unfortunately this is working for all of categories.</p>
  <p>My code below</p>
  <pre><code>add_filter( 'woocommerce_quantity_input_args', 'jk_woocommerce_quantity_input_args', 10, 2 );
  function jk_woocommerce_quantity_input_args( $args, $product ) {
      if ( is_cart() || is_checkout()  &amp;&amp; has_term( 'Mushroooms', 'product_cat' )  ) //  &amp;&amp;   current_user_can('wholesale') )
        {
          $args['input_value'] = 1; // Start from this value (default = 1) 
          $args['min_value']   = 1; // Minimum value
          $args['max_value']   = 2; // Minimum value
          $args['step']        = 1; // Quantity steps
          return $args;
      } else {
          $args['input_value'] = 1; // Start from this value (default = 1) 
          $args['min_value']   = 1; // Minimum value
          $args['max_value']   = 2; // Minimum value
          $args['step']        = 1; // Quantity steps
          return $args;
      }
  }
  
  // Variations
  add_filter( 'woocommerce_available_variation', 'jk_woocommerce_available_variation' );
  function jk_woocommerce_available_variation( $args ) {
      if (  has_term( 'Mushroooms','product_cat' ) ) //  &amp;&amp;   current_user_can('wholesale') )
          {
          $args['input_value'] = 1; // Start from this value (default = 1) 
          $args['min_value']   = 1; // Min quantity (default = 1)
          $args['max_value']   = 2; // Minimum value
          $args['step']        = 1; // Increment/decrement by this value (default = 1)
          return $args;
      } else {
          $args['min_value']   = 1; // Minimum value
          $args['max_value']   = 2; // Minimum value
          $args['step']        = 1; // Quantity steps
          $args['input_value'] = 1; // Starting value (we only want to affect product pages, not cart)
          return $args;
      } 
  }
  </code></pre>