WC_Countries::load_country_states()publicWC 1.0

Deprecated from version 3.6.0. It is no longer supported and can be removed in future releases. See d to load state files, but is no longer needed. @see get_states().

Load the states.

Method of the class: WC_Countries{}

Hooks from the method

Return

null. Nothing (null).

Usage

$WC_Countries = new WC_Countries();
$WC_Countries->load_country_states();

Changelog

Deprecated since 3.6.0 This method was used to load state files, but is no longer needed. @see get_states().

WC_Countries::load_country_states() code WC 9.4.2

public function load_country_states() {
	global $states;

	$states = include WC()->plugin_path() . '/i18n/states.php';

	/**
	 * Allows filtering of country states in WC.
	 *
	 * @since 1.5.3
	 *
	 * @param array $states
	 */
	$this->geo_cache['states'] = apply_filters( 'woocommerce_states', $states );
}