Automattic\WooCommerce\Gateways\PayPal

AddressRequirements::country_requires_postal_code │ public │ WC 1.0

Check if a country requires a postal code in the address.

Метод класса: AddressRequirements{}

Хуков нет.

Возвращает

bool.

Использование

$AddressRequirements = new AddressRequirements();
$AddressRequirements->country_requires_postal_code( $country_code );
$country_code(строка) (обязательный)
The ISO 3166-1 alpha-2 country code.

Код AddressRequirements::country_requires_postal_code() WC 11.2.2

public function country_requires_postal_code( string $country_code ) {
	return in_array( strtoupper( $country_code ), self::COUNTRIES_REQUIRING_POSTAL_CODE, true );
}