WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Countries::get_shipping_country_states() WC 1.0

Get shipping country states.

Это метод класса: WC_Countries

Возвращает

Массив.

Использование

$WC_Countries = new WC_Countries();
$var = $WC_Countries->get_shipping_country_states();

Код WC Countries::get shipping country states: woocommerce/includes/class-wc-countries.php WC 4.2.2

<?php
public function get_shipping_country_states() {
	if ( get_option( 'woocommerce_ship_to_countries' ) === '' ) {
		return $this->get_allowed_country_states();
	}

	if ( get_option( 'woocommerce_ship_to_countries' ) !== 'specific' ) {
		return $this->states;
	}

	$states = array();

	$raw_countries = get_option( 'woocommerce_specific_ship_to_countries' );

	if ( $raw_countries ) {
		foreach ( $raw_countries as $country ) {
			if ( ! empty( $this->states[ $country ] ) ) {
				$states[ $country ] = $this->states[ $country ];
			}
		}
	}

	return apply_filters( 'woocommerce_countries_shipping_country_states', $states );
}