Skip to content

Commit

Permalink
Fix setting name on subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed Sep 1, 2021
1 parent 78b7d6a commit 5d00c21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Http/Controllers/WebhookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ protected function handleCustomerSubscriptionUpdated(array $payload)
return;
}

$subscription->name = $subscription->name ?? $data['metadata']['name'] ?? $this->newSubscriptionName($payload);

$firstItem = $data['items']['data'][0];
$isSinglePrice = count($data['items']['data']) === 1;

Expand Down

0 comments on commit 5d00c21

Please sign in to comment.