There is a built-in tool to do this. Navigate to: WordPress Dashboard > WooCommerce > Status > Tools: Reset WC Vendors Roles.
If the tool fails to reset the roles, a second option exists:
If you have permission and capability problems with your vendors due to other plugins that modify these permissions and need to reset them you can add the following code to your themes functions.php and then log in to your site again from your my-account page.
This will only work if you use the WooCommerce my-account page. No other login page/widget will run the code.[ht_message mstyle=”alert” title=”” ” show_icon=”true” id=”” class=”” style=”” ]This will only work if you use the WooCommerce my-account page. No other login page / widget will run the code. [/ht_message]
[ht_message mstyle=”danger” title=”” ” show_icon=”” id=”” class=”” style=”” ]Remove this code from your themes functions.php after you have logged in. [/ht_message]