woocommerce_countries
Allows filtering of the list of countries in WC.
Usage
add_filter( 'woocommerce_countries', 'wp_kama_woocommerce_countries_filter' ); /** * Function for `woocommerce_countries` filter-hook. * * @param array $countries * * @return array */ function wp_kama_woocommerce_countries_filter( $countries ){ // filter... return $countries; }
- $countries(array)
- -
Changelog
Since 1.5.3 | Introduced. |
Where the hook is called
woocommerce_countries
woocommerce/includes/class-wc-countries.php 72
$this->geo_cache['countries'] = apply_filters( 'woocommerce_countries', include WC()->plugin_path() . '/i18n/countries.php' );