Skip to content

Commit

Permalink
Just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeholder committed Nov 8, 2024
1 parent e22e28c commit bcfd5ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ private function handleUserElementChanges(): void
if ($userRecord && $user->isCredentialed && $settings['syncChangedUserEmailsToStripe']) {
$oldEmail = $userRecord->getAttribute('email');
$newEmail = $user->email;
if ($oldEmail != $newEmail) {
if ($oldEmail && $newEmail && ($oldEmail != $newEmail)) {
$customers = $user->getStripeCustomers();
if ($customers->isNotEmpty()) {
$client = $this->getApi()->getClient();
Expand Down

0 comments on commit bcfd5ca

Please sign in to comment.