Created
August 4, 2023 09:11
-
-
Save wooxperto/b6d0a22eed7bbe329f879058c8fb9c8e to your computer and use it in GitHub Desktop.
Set min max and step product quantity at variable product single variation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @snippet Min, Max, Increment & Default Value Quantity | WooCommerce | |
* @author WooXperto | |
* @date 04.08.2023 | |
*/ | |
/* Set min max & Step Product quanity for variation product*/ | |
add_filter( 'woocommerce_available_variation', 'wooxperto_woocommerce_quantity_min_variation', 5555, 3 ); | |
function wooxperto_woocommerce_quantity_min_variation( $args, $product, $variation ) { | |
$args['min_qty'] = 5; | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Easily set min max step product quantity at variable product single variation