Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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