Forked from Bradley-D/WooCommerce: Quantity input args
Created
January 23, 2019 19:42
-
-
Save akshuvo/a13dcf60d844544b9ba07fd3856b3e2b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function bd_woocommerce_quantity_input_args( $args, $product ) { | |
$args['input_value'] = 1; // Starting value | |
$args['max_value'] = 800; // Maximum value | |
$args['min_value'] = 1; // Minimum value | |
$args['step'] = 1; // Quantity steps | |
return $args; | |
} | |
add_filter( 'woocommerce_quantity_input_args', 'bd_woocommerce_quantity_input_args', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment