diff --git a/cron.php b/cron.php index 425394c..01a9ab6 100644 --- a/cron.php +++ b/cron.php @@ -510,24 +510,27 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se $street = ''; $city = ''; $postal_code = ''; + if ( $order['client_street'] ) - { $street = $order['client_street']; - $city = $order['client_city']; - $postal_code = $order['client_postal_code']; - } else if ( $paczkomatData ) - { $street = $paczkomatData['address']; - $city = $paczkomatData['city']; - $postal_code = $paczkomatData['postalCode']; - } else if ( $orlenPointData ) - { $street = $orlenPointData['address']; + + if ( $order['client_city'] ) + $city = $order['client_city']; + else if ( $paczkomatData ) + $city = $paczkomatData['city']; + else if ( $orlenPointData ) $city = $orlenPointData['city']; + + if ( $order['client_postal_code'] ) + $postal_code = $order['client_postal_code']; + else if ( $paczkomatData ) + $postal_code = $paczkomatData['postalCode']; + else if ( $orlenPointData ) $postal_code = $orlenPointData['postalCode']; - } $postData = [ 'idExternal' => $order['id'],