Skip to content

Commit

Permalink
Update CheckoutBuilder.php
Browse files Browse the repository at this point in the history
regarding : #1585

in addition of : #1586

(with script style compliance)
  • Loading branch information
Ronan-Lenor authored Oct 25, 2023
1 parent 852e26d commit 5009078
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/CheckoutBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@ public function create($items, array $sessionOptions = [], array $customerOption

return $item;
})->values()->all(),
'tax_id_collection' => [
'enabled' => Cashier::$calculatesTaxes ?: $this->collectTaxIds,
],
]);

if (Cashier::$calculatesTaxes ?: $this->collectTaxIds) {
$payload['tax_id_collection'] = ['enabled' => true];
}

return Checkout::create($this->owner, array_merge($payload, $sessionOptions), $customerOptions);
}
}

0 comments on commit 5009078

Please sign in to comment.