diff --git a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php index 0b27656c..cbf3da30 100644 --- a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php +++ b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php @@ -63,9 +63,10 @@ class RetailCrmHistory $GLOBALS['RETAIL_CRM_HISTORY'] = true; $newUser = new CUser(); - $customerBuilder = new CustomerBuilder(); foreach ($customers as $customer) { + $customerBuilder = new CustomerBuilder(); + if (function_exists('retailCrmBeforeCustomerSave')) { $newResCustomer = retailCrmBeforeCustomerSave($customer); if (is_array($newResCustomer) && !empty($newResCustomer)) {