Last active
November 12, 2021 23:28
-
-
Save chrisegg/c40c4c761e2262a086dc9bc0d45d7b11 to your computer and use it in GitHub Desktop.
Complete tutorial here: https://gravityranger.com/set-default-product-quantity-gravity-forms
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
<?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