WC_Shipping_Zone::is_valid_location_type()publicWC 1.0

Is passed location type valid?

Method of the class: WC_Shipping_Zone{}

Hooks from the method

Return

true|false.

Usage

$WC_Shipping_Zone = new WC_Shipping_Zone();
$WC_Shipping_Zone->is_valid_location_type( $type );
$type(string) (required)
Type to check.

WC_Shipping_Zone::is_valid_location_type() code WC 9.4.2

public function is_valid_location_type( $type ) {
	return in_array( $type, apply_filters( 'woocommerce_valid_location_types', array( 'postcode', 'state', 'country', 'continent' ) ), true );
}