Skip to content

Commit

Permalink
Fix nullable invoice settings (#1732)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored Jan 13, 2025
1 parent 02d4e99 commit e351862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Concerns/ManagesPaymentMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function defaultPaymentMethod()
/** @var \Stripe\Customer */
$customer = $this->asStripeCustomer(['default_source', 'invoice_settings.default_payment_method']);

if ($customer->invoice_settings->default_payment_method) {
if ($customer->invoice_settings?->default_payment_method) {
return new PaymentMethod($this, $customer->invoice_settings->default_payment_method);
}

Expand Down

0 comments on commit e351862

Please sign in to comment.