Home / Admin / Resetting the Vendor & Pending Vendor Roles
Duplicate Snippet

Embed Snippet on Your Site

Resetting the Vendor & Pending Vendor Roles

Code Preview
php
<?php
add_filter('woocommerce_login_redirect', 'redo_roles', 10, 2); function redo_roles() { remove_role( 'pending_vendor' ); add_role( 'pending_vendor', __( 'Pending Vendor', 'wcvendors' ), array( 'read' => true, 'edit_posts' => false, 'delete_posts' => false ) ); remove_role( 'vendor' ); add_role( 'vendor', 'Vendor', array( 'assign_product_terms' => true, 'edit_products' => true, 'edit_product' => true, 'edit_published_products' => false, 'manage_product' => true, 'publish_products' => false, 'read' => true, 'upload_files' => true, 'view_woocommerce_reports' => true, ) ); }

Comments

Add a Comment