Created
August 31, 2017 23:03
-
-
Save spivurno/1d649fad6738997ca8a924c89291b711 to your computer and use it in GitHub Desktop.
Gravity Wiz // Gravity Forms Coupons // Allow Zero Amount Coupons
This file contains hidden or 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 | |
/** | |
* Gravity Wiz // Gravity Forms Coupons // Allow Zero Amount Coupons | |
* http://gravitywiz.com/ | |
*/ | |
add_filter( 'gform_gravityformscoupons_feed_settings_fields', function( $settings ) { | |
foreach( $settings as &$group ) { | |
foreach( $group['fields'] as &$field ) { | |
if( $field['name'] == 'couponAmountType' ) { | |
$field['validation_callback'] = null; | |
} | |
} | |
} | |
return $settings; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👉 This Gist has been migrated to the Gravity Wiz Snippet Library:
https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-coupons-allow-zero-amount-coupons.php