Search code examples
woocommercecartcheckoutcoupon

Coupons are automatically applied based on user_email


  • I searched for related documents but no longer works.(WooCommerce Student Discount)
  • I need to create a coupon in WooCommerce that will only work if the user has an email which ends in hcmute.edu.vn.
  • For example 15104032@student.hcmute.edu.vn

    Any help is appreciated.


Solution

  • Following the documentation you can go for Usage Restriction with the Allowed Emails/Email restrictions option, using wildcard character to mact multiple email addresses from a same domain.

    Allowed Emails/Email restrictions – Email address or addresses that can use a coupon. Verified against customer’s billing email. WooCommerce 3.4+ also allows you to include a wildcard character (*) to match multiple email addresses, for example, *@gmail.com would make any gmail address.