1
0
mirror of synced 2025-01-18 08:51:41 +03:00

Fix transfer payment status

This commit is contained in:
Dima Uryvskiy 2021-12-10 10:13:39 +03:00 committed by GitHub
parent 07735ed6d9
commit 5407d9111f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,10 +65,18 @@ class WC_Retailcrm_History_Assembler
if (isset($fields['item'][$change['field']]) && $fields['item'][$change['field']]) {
$orders[$change['order']['id']]['items'][$change['item']['id']][$fields['item'][$change['field']]] = $change['newValue'];
}
} elseif ($change['field'] == 'payments' && isset($change['payment'])) {
}
if ($change['field'] == 'payments' && isset($change['payment'])) {
if ($change['newValue'] !== null) {
$orders[$change['order']['id']]['payments'][] = self::newValue($change['payment']);
}
}
if ($change['field'] == 'payments.status') {
if ($change['newValue'] !== null) {
$orders[$change['order']['id']]['payment']['id']['status'] = self::newValue($change['newValue']);
}
} else {
if (isset($fields['delivery'][$change['field']]) && $fields['delivery'][$change['field']] == 'service') {
$orders[$change['order']['id']]['delivery']['service']['code'] = self::newValue($change['newValue']);