diff --git a/Invoice/Invoice.php b/Invoice/Invoice.php index 9f5832a..e4df90b 100644 --- a/Invoice/Invoice.php +++ b/Invoice/Invoice.php @@ -535,7 +535,7 @@ public function toArray($forApi = false) foreach ($this->getHistory() as $history) { $data['history'][] = $history->toArray($forApi); } - } else { + } elseif ($this->prepareForSending) { $data['prepare_for_sending'] = $this->prepareForSending; }