From cec1dafd36650811e22b7fee5983e978778568d9 Mon Sep 17 00:00:00 2001 From: Sergey Chazov Date: Tue, 23 Mar 2021 12:29:02 +0300 Subject: [PATCH] replace CustomerBuilder --- .../classes/general/history/RetailCrmHistory_v5.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) {