This page may contain affiliate links. Please read my disclaimer for more information.

Gravity Forms Limit Coupon Usage Per Customer

  |  by Chris Eggleston

Problem

When using the Gravity Forms Coupons Add-On, you can limit the number of times the coupon can be used overall, but you can not limit coupon usage per user.

Thanks to a user request, I came up with a couple of simple solutions.

Solution

#1 Use the No Duplicates feature.

This is a built-in feature that can be enabled for certain fields. If you enable this feature for the email field, the form will fail validation until you enter another email address.

#2 Using the gform_validation filter

This snippet uses the gform_validation filter to compare the email address to the coupon code entered. If the email has already been used to claim that coupon code, the submission validation fails, and a custom validation message is shown.

Add this code to your themes functions.php file or a code snippet plugin and follow the instructions in the code comments.

Need More Help?

If you still need help, feel free to use the comments or chat options below.

If you have an active Gravity Forms license, you can also, you can also open a support ticket here.

Photo of author
About the Author
Chris Eggleston
I’m not just a Gravity Forms enthusiast; I’m a dedicated father and loving husband. As the owner of WP Mantis & Marketing Draft, I’m on a mission to simplify the WordPress experience for site owners. I try to bring a unique perspective to the Gravity Forms community.

Support Chris - Donate $5

Gravity Wiz Add-Ons

Advertisement

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments