Skip to content

Commit

Permalink
Fix a stripe notice with SubscriptionBuilder and metered prices (#1261)
Browse files Browse the repository at this point in the history
This fixes a Stripe Notice (Stripe Notice: Undefined property of Stripe\SubscriptionItem instance: quantity) when using the SubscriptionBuilder with metered prices.
See my comments on #1254.
  • Loading branch information
mfauveau authored Oct 4, 2021
1 parent 4fad438 commit d7fa022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SubscriptionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ protected function createSubscription(StripeSubscription $stripeSubscription)
'stripe_id' => $item->id,
'stripe_product' => $item->price->product,
'stripe_price' => $item->price->id,
'quantity' => $item->quantity,
'quantity' => $item->quantity ?? null,
]);
}

Expand Down

0 comments on commit d7fa022

Please sign in to comment.