Automattic\WooCommerce\Gateways\PayPal
AddressRequirements::country_requires_city
Check if a country requires a city in the address.
Метод класса: AddressRequirements{}
Хуков нет.
Возвращает
true|false.
Использование
$AddressRequirements = new AddressRequirements(); $AddressRequirements->country_requires_city( $country_code );
- $country_code(строка) (обязательный)
- The ISO 3166-1 alpha-2 country code.
Код AddressRequirements::country_requires_city() AddressRequirements::country requires city WC 11.0.1
public function country_requires_city( string $country_code ) {
return in_array( strtoupper( $country_code ), self::COUNTRIES_REQUIRING_CITY, true );
}