Restricting WooCommerce Registrations by Email Domain for Secure Portals

Issue Overview

A private WooCommerce store, WordPress site, or WooCommerce support portal displayed a visible company dropdown during registration, registration page, or custom registration form—exposing the names of all approved partner companies. This raised a major privacy concern and made the site vulnerable to spam registrations, spam attacks, spam bots, fake accounts, or spam users.

The client needed to:

  • Hide the list of partners from the public form
  • Automatically assign users to a company based on their email domain
  • Reject registrations from unauthorized domains
  • Allow flexible updates to validation rules

What We Did

Removed public company selector

The visible company field was removed to prevent exposing internal partner data and protect your WooCommerce store from spam registrations on your WooCommerce site.

✉️ Email-based validation

We wrote a custom function that scanned the user’s email domain, email confirmation, email verification, or specific email addresses and matched it to a list of approved companies, stopping fake registrations and fake user accounts.

Smart company assignment

When a match was found, the user was automatically assigned to the correct partner company—no dropdown required. This works for WooCommerce registration, user accounts, or creating a custom registration form.

⛔ Block unauthorized access

If a domain didn’t match the whitelist, registration, user registration, or WooCommerce registration spam was blocked with a clear error message.
“Only authorized work email addresses will be approved.”

️ Admin-editable messaging

We made the error message editable via the WordPress dashboard, WordPress admin, or custom WordPress plugin—no need to touch code for future updates. This also works with WordPress plugins, recaptcha, Google recaptcha, recaptcha v2, or recaptcha v3 as an alternative to recaptcha.

Final Result

Registrations are now secure, automated, and privacy-friendly. Partner companies can manage domain access dynamically, block email, block spam, or entire domains, while unauthorized users are quietly filtered out. Spam bots, spammers, or malicious users can’t create fake accounts, fake orders, or spam registrations. Registration features, registration process, and WooCommerce registration form now function smoothly—no friction, no risk.

Build smarter, safer user flows with us

From registration security to dynamic content access, Integriti Studio crafts custom WooCommerce workflows that work for your business—not against it.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *