Skip to content

Commit

Permalink
Fix missing key "better_payment_customer_gender" in customfields (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
hasanzade-hasan authored Jul 9, 2024
1 parent 33904fe commit 5935257
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/EventSubscriber/CheckoutConfirmEventSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ private function birthdayIsMissing(CustomerEntity $customer): bool

private function genderIsMissing(CustomerEntity $customer): bool
{
return !$customer->getCustomFields()[CustomFieldInstaller::CUSTOMER_GENDER];
$customFields = $customer->getCustomFields();
return isset($customFields[CustomFieldInstaller::CUSTOMER_GENDER]) ? !$customFields[CustomFieldInstaller::CUSTOMER_GENDER] : true;
}
}
}

0 comments on commit 5935257

Please sign in to comment.