Automattic\WooCommerce\Gateways\PayPal
AddressRequirements::country_requires_postal_code
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() 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 );
}