how to change incremantal for a certain product
-
hi,
i want to sell certain two products, by 4 groups. so in that specific products page, incremental values should by 4 (4, 8 12 ..) not by 1 (3,4,5..). how can i do that?
Found a snippet but this is applying to whole shop. I need for two products.
add_filter( ‘woocommerce_quantity_input_args’, ‘jk_woocommerce_quantity_input_args’, 10, 2 );
function jk_woocommerce_quantity_input_args( $args, $product ) {
if ( is_singular( ‘product’ ) ) {
$args[‘input_value’] = 2; // Starting value (we only want to affect product pages, not cart)
}
$args[‘max_value’] = 80; // Maximum value
$args[‘min_value’] = 2; // Minimum value
$args[‘step’] = 2; // Quantity steps
return $args;
}
- The topic ‘how to change incremantal for a certain product’ is closed to new replies.