Skip to content

Instantly share code, notes, and snippets.

@kartikparmar
Created July 22, 2020 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kartikparmar/9694ca4e692903399f4de6fd28c2625f to your computer and use it in GitHub Desktop.
Save kartikparmar/9694ca4e692903399f4de6fd28c2625f to your computer and use it in GitHub Desktop.
Changing the steps quantity to 2 for all the WooCommerce products
<?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