Fix transfer payment status
This commit is contained in:
parent
07735ed6d9
commit
5407d9111f
@ -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']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user