WC_Countries::get_states( string $cc = null )
Get the states for a country.
Description Description
Parameters Parameters
- $cc
-
(Optional) Country code.
Default value: null
Return Return
(false|array) of states
Source Source
File: includes/class-wc-countries.php
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; } }