plugins_update_check_locales filter-hookWC 3.7.0

This is a WordPress - plugins_update_check_locales hook. The plugin just uses it.

Filters the locales requested for plugin translations.

Usage

add_filter( 'plugins_update_check_locales', 'wp_kama_plugins_update_check_locales_filter' );

/**
 * Function for `plugins_update_check_locales` filter-hook.
 * 
 * @param string[] $locales Plugin locales.
 *
 * @return string[]
 */
function wp_kama_plugins_update_check_locales_filter( $locales ){

	// filter...
	return $locales;
}
$locales(string[])
Plugin locales.
Default: all available locales of the site

Changelog

Since 3.7.0 Introduced.
Since 4.5.0 The default value of the $locales parameter changed to include all locales.

Where the hook is called

WC_Helper_Updater::get_translations_update_data()
plugins_update_check_locales
woocommerce/includes/admin/helper/class-wc-helper-updater.php 230
$locales = apply_filters( 'plugins_update_check_locales', $locales );

Where the hook is used in WooCommerce

Usage not found.