1
0
Fork 0
mirror of synced 2025-04-06 07:13:33 +03:00

Fix transfer payment status

This commit is contained in:
dima-uryvskiy 2021-11-11 20:03:30 +03:00
parent 07735ed6d9
commit c2e097a6e6

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']);