Skip to content

Instantly share code, notes, and snippets.

@Bradley-D
Created August 14, 2014 02:22
Show Gist options
  • Save Bradley-D/b48ae2c8a362f834f720 to your computer and use it in GitHub Desktop.
Save Bradley-D/b48ae2c8a362f834f720 to your computer and use it in GitHub Desktop.
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 );
@akshuvo
Copy link

akshuvo commented Jan 23, 2019

Thanks

@aki4891
Copy link

aki4891 commented Mar 18, 2021

Is there a way we can set this up (especialy 'step') for individual variation in a variable product?

@Bradley-D
Copy link
Author

@aki4891 I would say it could be but I have not looked into this for variation products to be honest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment