-
-
Save theeventscalendar/395c8daab325775da9b4 to your computer and use it in GitHub Desktop.
Set a default quantity in the Ticket form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
woocommerce_quantity_input( array( | |
'input_name' => 'quantity_' . $ticket->ID, | |
'input_value' => 0, | |
'min_value' => 0, | |
'max_value' => $max_quantity, | |
) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this snippet, which sets initial quantity to "0", but does not allow quantity to return to "0" after being increased to any other integer (see here: http://www.screencast.com/t/zFuRmUZMjn) however, setting 'min_value' to "-1" allows quantity to set to "0" and "-1".
Is there a workaround?