woocommerce_countries filter-hookWC 1.5.3

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

WC_Countries::get_countries()
woocommerce_countries
woocommerce/includes/class-wc-countries.php 70
$this->geo_cache['countries'] = apply_filters( 'woocommerce_countries', include WC()->plugin_path() . '/i18n/countries.php' );

Where the hook is used in WooCommerce

Usage not found.