Hello, we've had the issue with 2 customers now, when they get to the Woo cart page, they change the quantity of the product thinking they will get an extra booking when of course all they get is a purchase of 0.00 and no appointment.
Is it possible to disable changing the quantity in the cart for Amelia products?
add_filter( 'woocommerce_quantity_input_args', 'hide_quantity_input_field', 20, 2 );
function hide_quantity_input_field( $args, $product ) { // Here set your product categories in the array (can be either an ID, a slug, a name or an array) $categories = array('category-name1','category-name2shoes');
// Handling product variation $the_id = $product->is_type('variation') ? $product->get_parent_id() : $product->get_id();
// Only on cart page for a specific product category if( is_cart() && has_term( $categories, 'product_cat', $the_id ) ){ $input_value = $args['input_value']; $args['min_value'] = $args['max_value'] = $input_value; } return $args;
}
Hello, we've had the issue with 2 customers now, when they get to the Woo cart page, they change the quantity of the product thinking they will get an extra booking when of course all they get is a purchase of 0.00 and no appointment.
Is it possible to disable changing the quantity in the cart for Amelia products?
Thanks
Miriam
Solved this using this snippet in functions.php:-
Hello Miriam,
Glad to see you managed to find a solution to the issue you had, thank you for letting us know.
If you have any other questions or concerns feel free to open a new ticket and we will gladly help out.