This code adds a custom role for vendors/product contributors so admins can review new products submitted for review prior to publishing.
The code also enables you to set custom capabilities providing the site owner control over what can be accessed, edited, read and deleted similar to the default contributor role in WordPress.
Demo Video
Shows how to create a new user withe the vendor role enabling user submitted wooCommerce products that can be reviewed by admins before publishing.
Installation Steps
There’s 2 steps :
- # Copy the PHP code from functions.php ( without the opening PHP tag ) to the end of your child themes functions file.
- # Create a new user and select the Vendor role like you see in the demo video.
Note : Once you have installed the code, you m ay need to switch to another theme and then switch back as the code uses the switch_theme hook.
Was This Tutorial Helpful?