Skip to content

Commit

Permalink
fallback on country if state is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudio Biselli authored and Claudio Biselli committed Dec 19, 2024
1 parent 4e15ff7 commit bb99dea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions www/src/CPGraphQlTypes/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ public function __construct(array $options)
new DateTime($options['planRenewalDate']) : null;
$this->next_wpt_plan_id = $options['nextWptPlanId'] ?? null;
$this->address = null;

if (!isset($options['creditCardBillingState']) && strlen(trim($options['creditCardBillingState'])) == 0) {
$options['creditCardBillingState'] = $options['creditCardBillingCountry'];
}

if (
isset($options['creditCardBillingCountry']) &&
isset($options['creditCardBillingZip']) &&
Expand Down

0 comments on commit bb99dea

Please sign in to comment.