Better handling of failsafe for US State calculations

This commit is contained in:
David Bomba 2024-02-26 07:32:23 +11:00
parent 18bdeb5a99
commit 8ca9d0ff0e

View File

@ -264,7 +264,7 @@ class BaseRule implements RuleInterface
return USStates::getState(strlen($this->client->postal_code) > 1 ? $this->client->postal_code : $this->client->shipping_postal_code); return USStates::getState(strlen($this->client->postal_code) > 1 ? $this->client->postal_code : $this->client->shipping_postal_code);
} catch (\Exception $e) { } catch (\Exception $e) {
return $this->client->company->country()->iso_3166_2 == 'US' ? $this->client->company->tax_data->seller_subregion : 'CA'; return 'CA';
} }
} }