Support » Plugin: WooCommerce » Restrict product sale to specific email domain?

  • I run an online training site, utilizing woo and subscriptions and we’re starting to sell membership packages to companies with hundreds of employees. Users sign up to the specific company membership via a password protected free product.

    What I need to do is be able to restrict access to each product to the company email domain. So if I sell to a company called “fxguide”, I only allow email addresses with “fxguide.com” in them. Most of the people will be creating accounts at sign-up.

    I figure I can approach one of two ways — verifying the email with javascript when “Place Order” is clicked or hooking into some hook before the order is actually added to the database. I’m fairly comfortable writing custom php functions so I’d kinda prefer that option (still learning js). I know I could check product ID and verify email in php, for instance.

    I’m curious if anyone has had to do something like this and would care to share their experiences or insight as to best practices. Thanks!

  • The topic ‘Restrict product sale to specific email domain?’ is closed to new replies.