Pages

Monday, June 9, 2014

Woocommerce create role for vendor and add products capabilities for him

Please write below code in functions.php



add_role('shop_vendor', 'Shop Vendor', array(
'read' => true,
'read_product' => true,
'edit_product' => true,
'edit_products' => true,
'edit_private_products' => true,
'delete_product' => true,
'delete_products' => true,
'delete_published_products' => true,
'publish_product' => true,
'publish_products' => true,
'edit_published_products' => true,
'assign_product_terms' => true,
));

No comments: