WordPress at Your Fingertips
function is not described

WC_Countries::get_states() public WC 1.0

Get the states for a country.

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

Hooks from the method
Return

false|Array. of states

Usage

$WC_Countries = new WC_Countries();
$WC_Countries->get_states( $cc );
$cc(string)
Country code.
Default: null

Code of WC_Countries::get_states() WC 5.6.0

public function get_states( $cc = null ) {
	if ( ! isset( $this->states ) ) {
		$this->states = apply_filters( 'woocommerce_states', include WC()->plugin_path() . '/i18n/states.php' );
	}

	if ( ! is_null( $cc ) ) {
		return isset( $this->states[ $cc ] ) ? $this->states[ $cc ] : false;
	} else {
		return $this->states;
	}
}