Title: Different minimum quantity for each attribute
Last modified: July 13, 2022

---

# Different minimum quantity for each attribute

 *  Resolved [bernibernal](https://wordpress.org/support/users/bernibernal/)
 * (@bernibernal)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/different-minimum-quantity-for-each-attribute/)
 * Good afternoon, I would like to know if there is any code or complement, with
   which a different minimum quantity could be established, that the user should
   buy, for each attribute of a variable product.
 * All the best.

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

 *  [Mirko P.](https://wordpress.org/support/users/rainfallnixfig/)
 * (@rainfallnixfig)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/different-minimum-quantity-for-each-attribute/#post-15823188)
 * Hi [@bernibernal](https://wordpress.org/support/users/bernibernal/)!
 * Thanks for getting in touch in the WooCommerce forum.
 * The [Min/Max Quantities](http://woocommerce.com/products/minmax-quantities/) 
   extension for WooCommerce allows you to define minimum and maximum allowable 
   quantities per variation which is something that WooCommerce alone won’t do by
   default. Does this work for you?
 * If not, you’d need help from a developer to define a feature for the minimum 
   quantity for each attribute. If you would like to investigate that possibility
   further, you could reach out to some of the official WooCommerce development 
   partners via this link – [https://woocommerce.com/experts/](https://woocommerce.com/experts/).
 * Extensions in the marketplace come with a 30 day refund policy so you can test
   out **Min/Max Quantities** and check if it works right for you, or you can get
   your money back if it’s not what you’re looking for.
 * Cheers.
 *  Thread Starter [bernibernal](https://wordpress.org/support/users/bernibernal/)
 * (@bernibernal)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/different-minimum-quantity-for-each-attribute/#post-15823704)
 * Thank you very much [@rainfallnixfig](https://wordpress.org/support/users/rainfallnixfig/)
   yes your information is useful to me, although I was looking for a code or a 
   free solution, but thank you very much for your help.
 * In fact, I have a code that limits the quantity to 50 of all my variable products,
   but I cannot find the solution to be able to segment this quantity by the attributes
   of my products. The code is the following:
 * function woocommerce_available_variation( $args ) {
    $args[‘max_qty’] = 1000;//
   Maximum value (variations) $args[‘min_qty’] = 50; // Minimum value (variations)
   return $args; }
 * add_filter( ‘woocommerce_available_variation’, ‘woocommerce_available_variation’);//
   Variations`
 *  [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * (@margaretwporg)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/different-minimum-quantity-for-each-attribute/#post-15824701)
 * Hi [@bernibernal](https://wordpress.org/support/users/bernibernal/)
 * I understand that you want to be able to segment the total quantity (of 50) by
   attributes.
 * For help with modification of the code, we recommend reaching out at the following
   channels for any development-oriented questions:
    - WooCommerce Developer Resources Portal: [https://developer.woocommerce.com/](https://developer.woocommerce.com/)
    - WooCommerce Slack Community: [https://woocommerce.com/community-slack/](https://woocommerce.com/community-slack/)
    - WooCommerce Community on Facebook: [https://www.facebook.com/groups/advanced.woocommerce/](https://www.facebook.com/groups/advanced.woocommerce/)
 * You can also reach out to someone on our [customizations page](https://woocommerce.com/customizations/).
 * * _Support for custom coding is beyond the [scope of support](https://woocommerce.com/support-policy/)
   we are able to provide in this forum. This particular forum is for questions 
   that are related to the WooCommerce core features._
 *  Thread Starter [bernibernal](https://wordpress.org/support/users/bernibernal/)
 * (@bernibernal)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/different-minimum-quantity-for-each-attribute/#post-15835539)
 * Thanks [@margaretwporg](https://wordpress.org/support/users/margaretwporg/) !!

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

The topic ‘Different minimum quantity for each 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/)

 * 4 replies
 * 3 participants
 * Last reply from: [bernibernal](https://wordpress.org/support/users/bernibernal/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/different-minimum-quantity-for-each-attribute/#post-15835539)
 * Status: resolved