Automattic\WooCommerce\Gateways\PayPal
AddressRequirements::country_requires_city
Check if a country requires a city in the address.
Method of the class: AddressRequirements{}
No Hooks.
Returns
true|false.
Usage
$AddressRequirements = new AddressRequirements(); $AddressRequirements->country_requires_city( $country_code );
- $country_code(string) (required)
- The ISO 3166-1 alpha-2 country code.
AddressRequirements::country_requires_city() AddressRequirements::country requires city code WC 10.4.3
public function country_requires_city( string $country_code ) {
return in_array( strtoupper( $country_code ), self::COUNTRIES_REQUIRING_CITY, true );
}