AddressZoneInterface

Type
Interface
Namespace
craft\commerce\base
Implemented by
craft\commerce\models\ShippingAddressZone, craft\commerce\models\TaxAddressZone
Since
2.0

Zone Interface defines the common interface to be implemented by zones in commerce.

View source (opens new window)

# Public Methods

Method Description
getCountries() Return the array of Commerce Countries this zone contains
getCountryIds() Return the array of Commerce Country IDs this zone contains
getIsCountryBased() Whether this zone is based on countries only.
getStateIds() Return the array of Commerce State IDs this zone contains
getStates() Return the array of Commerce States this zone contains
getZipCodeConditionFormula() Return the zip code match

# getCountries()

Return the array of Commerce Countries this zone contains

View source (opens new window)

Returns

craft\commerce\models\Country[]

# getCountryIds()

Return the array of Commerce Country IDs this zone contains

View source (opens new window)

Returns

integer (opens new window)[]

# getIsCountryBased()

Whether this zone is based on countries only.

View source (opens new window)

Returns

boolean (opens new window)

# getStateIds()

Return the array of Commerce State IDs this zone contains

View source (opens new window)

Returns

integer (opens new window)[]

# getStates()

Return the array of Commerce States this zone contains

View source (opens new window)

Returns

craft\commerce\models\State[]

# getZipCodeConditionFormula()

Since
2.2

Return the zip code match

View source (opens new window)

Returns

string (opens new window)