reseller to customer
This commit is contained in:
@@ -125,4 +125,24 @@ function wiaas_db_setup_customer_capabilities() {
|
||||
$customer_role->add_cap('list_users');
|
||||
$customer_role->add_cap('edit_users');
|
||||
|
||||
}
|
||||
|
||||
function wiaas_db_setup_create_customer_commercial_lead_table() {
|
||||
global $wpdb;
|
||||
|
||||
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
||||
|
||||
$sql = "
|
||||
CREATE TABLE {$wpdb->prefix}wiaas_shop_customer_relationships (
|
||||
`ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`customer_id` bigint(20) unsigned NOT NULL,
|
||||
`shop_owner_id` bigint(20) unsigned NOT NULL,
|
||||
`order_type` varchar(44) NOT NULL default '',
|
||||
PRIMARY KEY (`ID`),
|
||||
KEY `relationship` (`customer_id`, `shop_owner_id`),
|
||||
KEY `order_type` (`order_type`)
|
||||
) COLLATE {$wpdb->collate};
|
||||
";
|
||||
|
||||
dbDelta( $sql );
|
||||
}
|
||||
@@ -141,4 +141,6 @@ function wiaas_db_import_aam_role_settings() {
|
||||
function wiaas_db_update_update_commercial_lead_capabilities() {
|
||||
// add commercial lead specific roles
|
||||
wp_roles()->add_cap( 'commercial_lead', 'manage_wiaas_cl_products' ); // cl products screen
|
||||
wp_roles()->add_cap( 'commercial_lead', 'view_admin_dashboard' ); // cl products screen
|
||||
wp_roles()->add_cap( 'commercial_lead', 'manage_wiaas_cl_customers' ); // cl products screen
|
||||
}
|
||||
Reference in New Issue
Block a user