WC_Countries::get_european_union_countries()
Gets an array of countries in the EU.
Method of the class: WC_Countries{}
Hooks from the method
Return
String[]
.
Usage
$WC_Countries = new WC_Countries(); $WC_Countries->get_european_union_countries( $type );
- $type(string)
- Type of countries to retrieve. Blank for EU member countries. eu_vat for EU VAT countries.
Default: ''
WC_Countries::get_european_union_countries() WC Countries::get european union countries code WC 9.4.2
public function get_european_union_countries( $type = '' ) { $countries = array( 'AT', 'BE', 'BG', 'CY', 'CZ', 'DE', 'DK', 'EE', 'ES', 'FI', 'FR', 'GR', 'HR', 'HU', 'IE', 'IT', 'LT', 'LU', 'LV', 'MT', 'NL', 'PL', 'PT', 'RO', 'SE', 'SI', 'SK' ); if ( 'eu_vat' === $type ) { $countries[] = 'MC'; } return apply_filters( 'woocommerce_european_union_countries', $countries, $type ); }