1
0
mirror of synced 2025-03-22 16:13:50 +03:00

Add transfer of order numbers from CMS to CRM by history sync

This commit is contained in:
Dima Uryvskiy 2022-02-24 18:56:48 +03:00 committed by GitHub
parent fa32395161
commit 9113a89cd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,6 +246,16 @@ if (!class_exists('WC_Retailcrm_History')) :
$wcOrder->calculate_totals();
}
if (
$order['number'] != $wcOrderId
&& isset($this->retailcrmSettings['update_number'])
&& $this->retailcrmSettings['update_number'] == WC_Retailcrm_Base::YES
) {
$order['number'] = $wcOrderId;
$this->retailcrm->ordersEdit($order, 'id');
}
// @codeCoverageIgnoreStart
} catch (Exception $exception) {
WC_Retailcrm_Logger::add(