Wrong quantity if default quantity is set
-
Hello,
I’m not sure when the issue started, but with the current version, I have the following problem:
I changed the default value of the Add To Cart Input Field to eg. 7 using the Filter “woocommerce_quantity_input_args” / $args[‘input_value’] = 7;
If I now add, say, 10 from one product to the basket, the price is correctly calculated, but the input field, which should be 10, is instead 7.
In previous Versions, the error did not appear.
If you want to reproduce the error:
function custom_quantity( $args, $product ) {
if (is_woocommerce() ){
$args['input_value'] = 7;
}
return $args;
}
add_filter( 'woocommerce_quantity_input_args', 'custom_quantity', 10, 2 );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Wrong quantity if default quantity is set’ is closed to new replies.