1. Home
  2. Knowledge Base
  3. WooCommerce Wholesale Order Form
  4. Form Builder
  5. How to restrict the order form to load only certain product categories

How to restrict the order form to load only certain product categories

If your store has a lot of product categories, you may not want every one of them to appear in your WooCommerce Wholesale Order Form. You can restrict an order form to only load products from specific categories, or the opposite: load every category except a select few.

The Included Category and Excluded Category settings control this. The sections below explain how they work together, and how they work with the Category Filter element.

Requirements

  • WooCommerce
  • WooCommerce Wholesale Order Form installed and activated.
  • An active order form already created. If you have not set one up yet, read Set up Wholesale Order Form first.

Restrict categories in the Form Editor

The Form Editor gives you two settings for this: Included Category restricts the form to only the categories you choose, and Excluded Category loads every category except the ones you choose. Only one of the two can be active at a time on a given order form.

  1. Go to Wholesale → Order Forms.
  2. Click the order form you want to edit to open the Form Editor.
  3. In the sidebar, click the Settings tab.
  4. Scroll down to the Included Category and Excluded Category fields.
  5. To show only specific categories, select them in Included Category. To hide specific categories while loading everything else, select them in Excluded Category instead.
  6. Click Update to apply the change. On a new or draft form, click Publish.
Included Category and Excluded Category fields in the Wholesale Order Form Settings tab, with two categories selected in Included Category
Wholesale → Order Forms → Form Editor → Settings tab: Included Category and Excluded Category fields

Included Category takes priority over Excluded Category. As soon as you add at least one category to Included Category, the Excluded Category field is cleared and becomes disabled, since the two settings cannot be combined on the same order form. Remove every category from Included Category to use Excluded Category again.

Default Category and the Category Filter element

The same Settings tab includes a Default Category field. When a customer first loads the form, the table shows only this category’s products. If the form has a Category Filter element, this category is also selected there.

Default Category field in the Wholesale Order Form Settings tab, set to a specific product category
Wholesale → Order Forms → Form Editor → Settings tab: Default Category field

Customers can pick another category in the Category Filter. To see every category the form allows, they click Clear Filters. This button is part of the Search & Clear Buttons element.

If you use Included Category, choose a Default Category from the same list. A Default Category outside your Included Category list still loads its products when the form first opens.

The first load follows Default Category in WooCommerce Wholesale Order Form 3.1.3 and later. On older versions, only admins and shop managers see the filtered first load, so update the plugin first.

The Category Filter element’s dropdown automatically follows your Included Category and Excluded Category settings. Customers can only filter within the categories you have allowed. You do not need to configure the element separately.

Restricting individual products instead of whole categories

If you need to restrict the form by product rather than by category, use the separate Include Products and Exclude Products fields, also found on the Settings tab. These work independently of the category settings above and let you specify individual products rather than entire categories.

Include Products field in the Wholesale Order Form Settings tab, with a specific product added to the include list
Wholesale → Order Forms → Form Editor → Settings tab: Include Products field

This setting only restricts which products appear on the order form itself. To restrict products by wholesale role across your entire store, use the Adjust Visibility features included in WooCommerce Wholesale Prices Premium.

Read more about that feature in Wholesale Products Visibility.

Troubleshooting

Why is the Excluded Category field disabled or grayed out?

Included Category takes priority over Excluded Category. Once one or more categories are added to Included Category, Excluded Category is cleared and disabled because the two settings cannot be active at the same time on one order form. Remove all categories from Included Category to re-enable Excluded Category.

I saved my category restriction, but the order form still shows the old products.

If the form is still a draft, click Publish. Save Draft does not change the live form. If the setting is published and the form still looks unchanged, clear any page or server-side cache, then reload the order form page.

Why doesn’t the Category Filter dropdown on my order form show all my categories?

The Category Filter element’s dropdown automatically follows your Included Category and Excluded Category settings. If a category is missing from the dropdown, check whether it has been excluded, or whether Included Category is set to a different set of categories.

Why does my order form show only one category when it first loads?

Check the Default Category field on the Settings tab. When it is set, the form first loads only that category’s products. To load every allowed category on the first load, clear the Default Category field and click Update.

Frequently asked questions

What happens if I leave both Included Category and Excluded Category empty?

The order form loads products from every product category with no restriction. This is the default behavior for a new order form.

Can I select more than one category in Included Category or Excluded Category?

Yes. Both fields accept multiple categories. If your store has a long list, you can search for a category by name or by its ID. Each option shows the ID in front of the name, for example [ID: 25] Hoodies. Search by ID needs WooCommerce Wholesale Order Form 3.1.1 or later.

Can I restrict the order form to specific individual products instead of whole categories?

Yes. Use the separate Include Products or Exclude Products fields on the Settings tab. These apply at the individual product level and work alongside the category settings rather than replacing them.

Does restricting categories on the order form also hide those products from my shop page?

No. This setting only affects what loads into that specific order form. Your shop page and other parts of your store are unaffected. To restrict product visibility by wholesale role across your entire store, use the Adjust Visibility features in WooCommerce Wholesale Prices Premium instead.

Do these settings apply to every order form on my site?

No. Each order form has its own independent Settings tab, so you can apply a different category restriction to each order form you create.

Does Default Category restrict what loads into the table?

Yes, for the first load. When a customer opens the form, the table shows only the products in the Default Category. Customers can then pick another category in the Category Filter, or click Clear Filters to see every category you allow with Included Category and Excluded Category. This needs WooCommerce Wholesale Order Form 3.1.3 or later. On older versions, only admins and shop managers see the filtered first load, so update the plugin first.

Can I select a subcategory without affecting its parent category?

Yes. The Included Category and Excluded Category fields list every product category, including subcategories, as individual options, so you can select or exclude a subcategory on its own without changing the setting for its parent category.

Need help?

We have a dedicated support team for Wholesale Suite who knows our products, WooCommerce, and the industry very well. You’re welcome to make use of their expertise at any time, worldwide.

If you are an existing customer please go to the support ticket request form and send us a message.

If you are a free plugin user, please send us a support request on the forum. We actively monitor the WordPress.org support forums for the free plugin and help our users there as best as we can.

Was this article helpful?

Related Articles

Complete Your Purchase