reseller to customer
This commit is contained in:
@@ -13,14 +13,17 @@ class Wiaas_Customer {
|
||||
|
||||
public static function get_customer_info($customer_id){
|
||||
$user = get_userdata($customer_id);
|
||||
|
||||
$organization_id = wiaas_get_user_organization_id($customer_id);
|
||||
|
||||
$result = array(
|
||||
'id' => $customer_id,
|
||||
'company_id' => self::get_customer_company_id($customer_id),
|
||||
'company_id' => $organization_id,
|
||||
'is_company_admin' => self::get_customer_company_admin_status($customer_id),
|
||||
'mail' => $user->user_email,
|
||||
'name' => $user->first_name . ' ' . $user->last_name,
|
||||
'phone' => self::get_customer_phone_number($customer_id),
|
||||
'company_name' => self::get_customer_company_name($customer_id),
|
||||
'company_name' => wiaas_get_organization_name($organization_id),
|
||||
'vat_code' => self::get_customer_vat_code($customer_id),
|
||||
'billing_addresses' => self::get_customer_billing_addresses($customer_id),
|
||||
'profile_addresses' => self::get_customer_profile_addresses($customer_id),
|
||||
@@ -80,10 +83,6 @@ class Wiaas_Customer {
|
||||
return get_user_meta($customer_id, 'company_name', true) ?: '';
|
||||
}
|
||||
|
||||
public static function get_customer_company_id($customer_id){
|
||||
return 0; //TODO: don't hardocde this
|
||||
}
|
||||
|
||||
public static function get_customer_company_admin_status($customer_id){
|
||||
return 1; //TODO: don't hardcode this
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user