WordPress filter hook · part of WordPress core
plugins_update_check_locales
A WordPress core filter that 6 plugins also fire themselves, running on 7.6M+ sites between them.
“Filters the locales requested for plugin translations.”
How to use plugins_update_check_locales
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'plugins_update_check_locales', function( $locales ) {
// Change $locales here.
return $locales;
}, 10, 1 );Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
6 plugins that fire plugins_update_check_locales
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
apply_filters( 'plugins_update_check_locales', $locales )includes/admin/helper/class-wc-helper-updater.php:962 -
MailPoet500,000+ installs
apply_filters( 'plugins_update_check_locales', $locales )lib/Config/TranslationUpdater.php:77 -
WP Job Manager70,000+ installs
apply_filters( 'plugins_update_check_locales', $locales )includes/helper/class-wp-job-manager-helper.php:203 -
SureCart70,000+ installs
apply_filters( 'plugins_update_check_locales', array_values( get_available_languages() ) )app/src/WordPress/TranslationsServiceProvider.php:79 -
WP Security By Made I.T.10+ installs
apply_filters( 'plugins_update_check_locales', $locales )inc/WP_MadeIT_Security_Plugin.php:214 -
AIO Performance Profiler, Monitor, Optimize, Compress & Debug10+ installs
apply_filters( 'plugins_update_check_locales', $locales )siteinfo/checkupdates-status.php:203
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.