Last active
March 8, 2021 14:03
-
-
Save jameskoster/6061298 to your computer and use it in GitHub Desktop.
Revisions
-
jameskoster revised this gist
Nov 14, 2013 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,10 @@ // Simple products add_filter( 'woocommerce_quantity_input_args', 'jk_woocommerce_quantity_input_args', 10, 2 ); function jk_woocommerce_quantity_input_args( $args, $product ) { $args['input_value'] = 2; // Starting value $args['max_value'] = 80; // Maximum value $args['min_value'] = 2; // Minimum value $args['step'] = 2; // Quantity steps return $args; } -
jameskoster revised this gist
Aug 5, 2013 . 1 changed file with 13 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,17 @@ // Simple products add_filter( 'woocommerce_quantity_input_args', 'jk_woocommerce_quantity_input_args', 10, 2 ); function jk_woocommerce_quantity_input_args( $args, $product ) { $args['input_value'] = 2 // Starting value $args['max_value'] = 80; // Maximum value $args['min_value'] = 2; // Minimum value $args['step'] = 2; // Quantity steps return $args; } // Variations add_filter( 'woocommerce_available_variation', 'jk_woocommerce_available_variation' ); function jk_woocommerce_available_variation( $args ) { $args['max_qty'] = 80; // Maximum value (variations) $args['min_qty'] = 2; // Minimum value (variations) return $args; } -
jameskoster created this gist
Jul 23, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ add_filter( 'woocommerce_quantity_input_args', 'jk_woocommerce_quantity_input_args', 10, 2 ); function jk_woocommerce_quantity_input_args( $args, $product ) { $args['input_value'] = 2; // Starting value $args['max_value'] = 80; // Maximum value $args['min_value'] = 2; // Minimum value $args['step'] = 2; // Quantity steps return $args; }