Created
July 22, 2020 06:34
-
-
Save kartikparmar/9694ca4e692903399f4de6fd28c2625f to your computer and use it in GitHub Desktop.
Changing the steps quantity to 2 for all the WooCommerce products
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 | |
/* | |
* Changing the steps quantity to 2 for all the WooCommerce products | |
*/ | |
function woocommerce_quantity_input_step_callback( $step, $product ) { | |
$step = 2; | |
return $step; | |
} | |
add_filter( 'woocommerce_quantity_input_step', 'woocommerce_quantity_input_step_callback', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment