1
0
Fork 0
mirror of synced 2025-04-06 07:13:33 +03:00

fix for customers upload

This commit is contained in:
Pavel 2019-11-26 10:32:01 +03:00
parent 2fd4b2577f
commit 0cfad0849f

View file

@ -167,13 +167,7 @@ if (!class_exists('WC_Retailcrm_Customers')) :
$customer = $this->wcCustomerGet($user->ID);
if ($corporateEnabled && static::customerPossiblyCorporate($customer)) {
$this->processCorporateCustomer($customer);
$data_corporate[] = array(
'customer' => $this->customerCorporate,
'address' => $this->customerCorporateAddress,
'company' => $this->customerCorporateCompany,
'contact' => $this->customerCorporateContact
);
$data_corporate[] = $customer;
} else {
$this->processCustomer($customer);
$data_customers[] = $this->customer;
@ -189,6 +183,11 @@ if (!class_exists('WC_Retailcrm_Customers')) :
time_nanosleep(0, 250000000);
}
foreach ($data_corporate as $corporateCustomer) {
$this->createCorporateCustomer($corporateCustomer);
time_nanosleep(0, 50000000);
}
return $data;
}