Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Coupons] Please allow wildcards like *@woothemes.com in email restrictions #9596

Closed
gerdneuman opened this issue Nov 13, 2015 · 2 comments
Closed

Comments

@gerdneuman
Copy link
Contributor

Currently the email restrictions for a coupon only allow a list of email addresses. It would be great if one could use * wildcards, because I need to add a whole organization there. The organization has about 300 (changing) members, these are easily identified by their mail address. Think of somethink like *@woothemes.com 😉

I guess that could be easily added. (In case you downvote this, I would be very happy for a pointer how else this could be done maybe by using a hook)

@mikejolley
Copy link
Member

Can you put this on http://ideas.woothemes.com/forums/133476-woocommerce to judge demand? Sounds useful, but more edge case.

For now you can add your own validation logic similar to how we do in the cart: https://github.com/woothemes/woocommerce/blob/master/includes/class-wc-cart.php#L170

If its not valid, trigger an error. Code can be based on what we have in the cart class now.

@gerdneuman
Copy link
Contributor Author

Added the idea: http://ideas.woothemes.com/forums/133476-woocommerce/suggestions/10691724--coupons-allow-wildcards-like-woothemes-com-in

But I suspect this will lie there indefintely... As you said it is an edge case only useful for a few people (like the whole email restriction list itself). As for the wildcards in postal codes I think it would still be good in order to complete the email restriction feature. Feels strange to have wildcards in postal codes but not for the email list... (and yeah, we would really need it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants