Class WC_Countries
WooCommerce countries
The WooCommerce countries class stores country/state data.
Package: WooCommerce\Classes
Category: Class
Author: WooThemes
Version: 1.6.4
Class: WC_Countries
Located at includes/class-wc-countries.php
Category: Class
Author: WooThemes
Version: 1.6.4
Class: WC_Countries
Located at includes/class-wc-countries.php
Methods summary
public
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
array
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
array
|
|
public
|
#
country_dropdown_options( string $selected_country = '', string $selected_state = '', boolean $escape = false )
Outputs the list of countries and states for use in dropdown boxes. |
public
array
|
|
public
string
|
|
public
array
|
#
get_default_address_fields( )
Returns the fields we show by default. This can be filtered later on. |
public
array
|
#
get_country_locale_field_selectors( )
Get JS selectors for fields which are shown/hidden depending on the locale. |
public
array
|
|
public
array
|
#
get_address_fields( mixed $country, string $type = 'billing_' )
Apply locale and get address fields |
Magic methods summary
Properties summary
public
array
|
$countries |
#
Array of countries |
public
array
|
$states |
#
Array of states |
public
array
|
$locale |
#
Array of locales |
public
array
|
$address_formats |
#
Array of address formats for locales |