Product Vendors Roles and Capabilities
-
Woocommerce Product Vendors creates new roles and capabilities. When a vendor admin or vendor manager is logged into the site and editing a products, they do not have access to the “resources” tab of the product page.
If you click that tab, the tab is blank. I want to restrict the cost tab in the exact same way.
When wordpress outputs the Vendor’s wp-admin/product-page, where does it decide, based on role, not to output the resources tab content? If I can find this, I can apply the same condition to the costs tab, yes?
Alternatively, is there a “Capability” like “edit_product_cost” that I can assign via a custom function?
The Woocommerce Product Vendors plugins defines roles and capabilities as follows:
protected function default_admin_vendor_caps() { return apply_filters( ‘wcpv_default_admin_vendor_role_caps’, array( ‘read_product’ => true, ‘manage_product’ => true, ‘edit_products’ => true, ‘edit_product’ => true, ‘edit_published_products’ => true, ‘edit_shop_orders’ => true, ‘assign_product_terms’ => true, ‘upload_files’ => true, ‘read’ => true, ‘manage_bookings’ => true, ‘edit_others_products’ => true, ‘view_vendor_sales_widget’ => true, ‘delete_published_products’ => true, ‘delete_others_products’ => true, ‘delete_posts’ => true, ‘delete_others_posts’ => true, ‘edit_comment’ => false, ‘edit_comments’ => false, ‘view_woocommerce_reports’ => false, ‘publish_products’ => false, ) ); }
- The topic ‘Product Vendors Roles and Capabilities’ is closed to new replies.