reseller to customer

This commit is contained in:
Almira Krdzic
2018-10-16 06:45:28 +02:00
parent b7ac53d195
commit afab22a30b
37 changed files with 852 additions and 152 deletions

View File

@@ -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 );
}