Hi thank you for your quick answer.
the error still seem to be there.
it seems that the following code is causing the issue:
add_filter( 'woocommerce_quantity_input_args', 'custom_quantity_input_args', 10, 2 );
function custom_quantity_input_args( $args, $product ){
if ( has_term( array('Menu'), 'product_cat', $product->get_id() ) ) {
if( ! is_cart() ) {
$args['input_value'] = 2; // Starting value
}
$args['min_value'] = 2; // Minimum value
$args['max_value'] = 10; // Maximum value
$args['step'] = 2; // Quantity steps
}
return $args;
}
// For Ajax add to cart button (define the min value)
add_filter( 'woocommerce_loop_add_to_cart_args', 'custom_loop_add_to_cart_quantity_arg', 10, 2 );
function custom_loop_add_to_cart_quantity_arg( $args, $product ) {
if ( has_term( array('Menu'), 'product_cat', $product->get_id() ) ) {
$args['quantity'] = 2; // Min value
}
return $args;
}
// For product variations (define the min value)
add_filter( 'woocommerce_available_variation', 'custom_available_variation_min_qty', 10, 2);
function custom_available_variation_min_qty( $data, $product, $variation ) {
if ( has_term( array('Menu'), 'product_cat', $product->get_id() ) ) {
$args['min_qty'] = 2; // Min value
}
return $data;
}
Can you see what would be the conflict?