Thank you very much @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`