From dd46e6384a5da99434357258e718605eb9d89287 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 22 Mar 2021 22:31:53 +1100 Subject: [PATCH] Clean line items for billing subscriptions --- .../BillingSubscription/BillingSubscriptionService.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Services/BillingSubscription/BillingSubscriptionService.php b/app/Services/BillingSubscription/BillingSubscriptionService.php index c030678d381c..b68a9e7fc116 100644 --- a/app/Services/BillingSubscription/BillingSubscriptionService.php +++ b/app/Services/BillingSubscription/BillingSubscriptionService.php @@ -20,12 +20,14 @@ use App\Models\PaymentHash; use App\Models\Product; use App\Models\SystemLog; use App\Repositories\InvoiceRepository; +use App\Utils\Traits\CleanLineItems; use App\Utils\Traits\MakesHash; use GuzzleHttp\RequestOptions; class BillingSubscriptionService { use MakesHash; + use CleanLineItems; /** @var BillingSubscription */ private $billing_subscription; @@ -68,7 +70,7 @@ class BillingSubscriptionService { $invoice_repo = new InvoiceRepository(); - $data['line_items'] = $this->createLineItems($data); + $data['line_items'] = $this->cleanItems($this->createLineItems($data)); /* If trial_enabled -> return early