COUPON issue. Can be abused

We have a monthly and annually set up with 1 month free (trial basis with amount to pay).

How can we make the coupon valid once per user only?

Hi Sigfred.

It is possible to have a uses limit for the coupon, but it’s not user specific. And it’s possible to make a coupon specific to a user. You could create a coupon with the user ID and limit the uses to just one, but then you’d need to create a separate one for each user you want to let have a coupon. Also, specifying the user for the coupon, will require him to be logged in to use it, won’t work for new signups.

And even if there were a way to limit coupon uses for new signups, or even if you did the above, nothing would stop someone that tries to abuse the system, from creating new accounts each time.

I think a better approach would be to check the user’s profile and see if he used the coupon before, and based on that, have the pro-form hide or show the coupon field to him. If he doesn’t see it displayed again… You’d need a bit of PHP for this.

For example, in your shortcode, in the accept_coupons attribute, you could have something like this:

accept_coupons="<?php echo (int)!in_array('your-coupon-code', get_user_field('s2member_coupon_codes')); ?>"

If the user didn’t use “you-coupon-code” before, then the pro-form will accept coupons. That’s just an example, you can tweak the code as needed.

I hope that helps. :slight_smile: