How To Fix Missing Wholesale Roles

Unfortunately, we do not have a single specific reason why wholesale roles might disappear.

In many cases, this is related to the use of a third-party user role editing plugin which suddenly removes the wholesale roles in the WooCommerce > Wholesale Roles setting.

Before you proceed: We strongly advise to backup your site and database before doing anything.

There are two ways to fix this issue:

1. Move your current wholesale users temporarily to a certain role using a third party User Role Editor plugin, then delete the wholesale role that was missing. Then re-create it again on WooCommerce > Wholesale Roles and re-apply the newly created role back to your users. This is the safest way to bring back the wholesale role and ideal if you have a few users.

2. If you have a backup of your site where your wholesale roles are still present, go to the Dashboard, then adjust the URL to point to /wp-admin/options.php. Find the wwp_options_registered_custom_roles. This meta key contains serialized data for the wholesale roles that you have. Copy its value from the backup site to the existing site and it should put the missing wholesale roles back.

Remember: editing via the options.php page is risky if modified incorrectly. So if you don’t know what you’re doing here, we suggest you contact a developer.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support