WordPress at Your Fingertips
function is not described


OrderController::validate_allowed_country() protected WC 1.0

Check all required address fields are set and return errors if not.

{} It's a method of the class: OrderController{}

No Hooks.


true|false. True if valid.


// protected - for code of main (parent) or child class
$result = $this->validate_allowed_country( $country, $allowed_countries );
$country(string) (required)
Country code.
$allowed_countries(array) (required)
List of valid country codes.

Code of OrderController::validate_allowed_country() WC 5.8.0

protected function validate_allowed_country( $country, array $allowed_countries ) {
	return array_key_exists( $country, $allowed_countries );