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
  • Loading branch information
Ronan-Lenor authored Oct 25, 2023
1 parent 852e26d commit b0d0046
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/CheckoutBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@ public function create($items, array $sessionOptions = [], array $customerOption
$item['quantity'] = $item['quantity'] ?? 1;

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

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 b0d0046

Please sign in to comment.