Skip to content

Instantly share code, notes, and snippets.

@chrisegg
Last active November 12, 2021 23:28
Show Gist options
  • Save chrisegg/c40c4c761e2262a086dc9bc0d45d7b11 to your computer and use it in GitHub Desktop.
Save chrisegg/c40c4c761e2262a086dc9bc0d45d7b11 to your computer and use it in GitHub Desktop.
<?php
// Copy everything below this line
add_filter( 'gform_field_value_default_quantity', 'gr_default_qty' );
function gr_default_qty() {
return 0; // change this number to your desired default quantity
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment