Replies: 0
Hi,
How to user become a vendor in BuddyBoss theme.
1. Can we merge Dokan registration form with buddyboss registration form by using any of the available hooks.
2. Can an existing user become a Vendor? Like clicked on button or filled another resignation form. Are there any hooks available?
I have tried to assign vendor capabilities to a user role(subscriber) but not working. My code are given below
$Dokan_capabilities = array(
'read',
'publish_posts',
'edit_posts',
'delete_published_posts',
'edit_published_posts',
'delete_posts',
'manage_categories',
'moderate_comments',
'unfiltered_html',
'upload_files',
'edit_shop_orders',
'edit_product',
'read_product',
'delete_product',
'edit_products',
'publish_products',
'read_private_products',
'delete_products',
'delete_products',
'delete_private_products',
'delete_published_products',
'delete_published_products',
'edit_private_products',
'edit_published_products',
'manage_product_terms',
'delete_product_terms',
'assign_product_terms',
'dokandar'
);
$role = get_role( 'subscriber' );
foreach( $Dokan_capabilities as $cap ) {
$role->add_cap( $cap );
}