From 601dabffd0ba851f8ac1898dc54806e2efae1674 Mon Sep 17 00:00:00 2001 From: Jonas De Keukelaere Date: Tue, 12 Oct 2021 12:10:31 +0100 Subject: [PATCH] Only add prepare_for_sending if it's true --- Invoice/Invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }