public function TaxZone::match in Commerce Core 8.2
Checks whether the given address belongs to the zone.
Parameters
\CommerceGuys\Addressing\AddressInterface $address: The address.
Return value
bool TRUE if the address belongs to the zone, FALSE otherwise.
File
- modules/
tax/ src/ TaxZone.php, line 198
Class
- TaxZone
- Represents a tax zone.
Namespace
Drupal\commerce_taxCode
public function match(AddressInterface $address) {
foreach ($this->territories as $territory) {
if ($territory
->match($address)) {
return TRUE;
}
}
return FALSE;
}