Worried that vendors on your marketplace can still find an order by typing in a customer’s email address, even after you’ve hidden emails from view? That’s expected behavior in WC Vendors today. There’s no built-in setting to exclude email from the vendor dashboard’s Orders search, and it’s a completely separate control from the setting that hides email addresses from display. This article explains how the two features differ, and walks you through a code snippet that removes email (and customer name/address) matching from the search box.
Before you begin
- A way to add custom PHP code to your site either on your child theme’s functions.php file, a site-specific plugin, or the WPCode Lite plugin
- WC Vendors active, with vendors who already have access to their Orders page in the vendor dashboard
- A staging site to test on first, since this changes what vendors can search for
What the “Customer Email” setting actually controls
WC Vendors has a setting called Customer Email, found under Settings → Capabilities → Orders. It’s enabled by default, and its description reads “Allow vendors to view the customer email address”. Turning it off hides the email address from the vendor’s orders table and from CSV order exports.

That setting only controls what’s displayed to the vendor. It has no effect on the Orders search box since a vendor can still type a customer’s email into the search field and get a match, whether or not the Customer Email capability is switched on. Hiding email and excluding it from search are two separate, unconnected behaviors.
What this fix can (and can’t) do
WC Vendors doesn’t store a customer’s email separately from the rest of their billing and shipping details when it comes to search. The Orders search matches against one combined field that includes the customer’s name, address, phone number, and email together. That means there’s no way to switch off matching for email alone while leaving name or address search turned on. The snippet below turns off both the All and Customer search options, which removes name, address, and email matching together, leaving Product and Order ID search available.
This is also a front-end restriction on the search form itself, not a hardened rule enforced on the server. It stops vendors from triggering an email match through the normal Orders page, but it isn’t a guaranteed privacy or compliance boundary. If you need that level of assurance, open a support ticket to discuss your options.
Add the code snippet
- Open the file where you keep custom code for your site. It could be your child theme’s functions.php file, a site-specific plugin, or a new snippet in the WPCode Lite plugin.
- Paste in the following code and save:
add_filter( 'wcv_order_filter_select', function( $args ) {
// Remove "All" and "Customer" — both match against the customer's
// name, address, and email address as a combined field.
unset( $args['options']['all'] );
unset( $args['options']['customer'] );
// Default to "Product" so an empty selection can't fall back
// to an "All" search.
if ( empty( $args['value'] ) ) {
$args['value'] = 'product';
}
return $args;
} );
- Optional: update the search box’s placeholder text, since it still reads “Search by ID, customer, product, or customer email” by default:
add_filter( 'wcv_order_search_input', function( $args ) {
$args['placeholder'] = __( 'Search by order ID or product', 'wc-vendors' );
return $args;
} );
add_action( 'wp_head', function() {
?>
<style>
.wcv-search-box-wrapper div.control-group:has(input.wcv-search-box-input) {
width: 250px;
}
</style>
<?php
} );
- Visit Vendor Dashboard → Orders as a vendor (or with vendor permissions) and confirm the Search by dropdown now only lists Product and Order ID.

Troubleshooting
The “Search by” dropdown still shows “All” and “Customer” after adding the snippet. This usually means the code was added to a theme or plugin that isn’t currently active, or a caching plugin is serving an older version of the Orders page. Confirm the snippet is in your active theme or an active plugin, then clear any page or object cache and reload the page.
A vendor can still find an order by searching a customer’s name or address, not just email. This is expected since WC Vendors searches name, address, and email as one combined field. Removing “Customer” and “All” removes matching on name and address too, not only email. There’s currently no way to keep name or address search working while excluding only email.
Frequently asked questions
Does turning off “Customer Email” in Settings → Capabilities → Orders also stop vendors from searching by email?
No. That setting only hides the email column from the orders table and from CSV exports, it isn’t read by the search feature at all. Use the code snippet above if you also want to stop the search itself from matching email addresses.
Can I remove only email from the search and keep customer name or address search working?
Not currently. WC Vendors searches the customer’s billing and shipping details as a single combined field, so there’s no way to exclude just the email portion. The snippet turns off both the “All” and “Customer” search options together.
Does this snippet affect the WooCommerce admin orders screen too?
No. It only changes the “Search by” dropdown on the vendor dashboard’s Orders page. WooCommerce‘s own admin order search is a separate feature and isn’t affected.
Need help?
- Premium users: Open a support ticket
- Free users: Visit our community forum