1
0
mirror of synced 2025-03-25 17:43:52 +03:00

Change order number transfer for history

This commit is contained in:
Dima Uryvskiy 2022-03-21 16:12:45 +03:00 committed by GitHub
parent 7f04fe822a
commit 81dc5071dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -236,12 +236,14 @@ if (!class_exists('WC_Retailcrm_History')) :
$wcOrder->calculate_totals(); $wcOrder->calculate_totals();
} }
$wcOrderNumber = $wcOrder->get_order_number();
if ( if (
$order['number'] != $wcOrderId $order['number'] != $wcOrderNumber
&& isset($this->retailcrmSettings['update_number']) && isset($this->retailcrmSettings['update_number'])
&& $this->retailcrmSettings['update_number'] == WC_Retailcrm_Base::YES && $this->retailcrmSettings['update_number'] == WC_Retailcrm_Base::YES
) { ) {
$order['number'] = $wcOrderId; $order['number'] = $wcOrderNumber;
$this->retailcrm->ordersEdit($order, 'id'); $this->retailcrm->ordersEdit($order, 'id');
} }