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:

functions.php
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.

  1. WooCommerce icon WooCommerce7+ million installs apply_filters( 'plugins_update_check_locales', $locales ) includes/admin/helper/class-wc-helper-updater.php:962
  2. MailPoet icon MailPoet500,000+ installs apply_filters( 'plugins_update_check_locales', $locales ) lib/Config/TranslationUpdater.php:77
  3. WP Job Manager icon WP Job Manager70,000+ installs apply_filters( 'plugins_update_check_locales', $locales ) includes/helper/class-wp-job-manager-helper.php:203
  4. SureCart icon SureCart70,000+ installs apply_filters( 'plugins_update_check_locales', array_values( get_available_languages() ) ) app/src/WordPress/TranslationsServiceProvider.php:79
  5. WP Security By Made I.T. icon WP Security By Made I.T.10+ installs apply_filters( 'plugins_update_check_locales', $locales ) inc/WP_MadeIT_Security_Plugin.php:214
  6. AIO Performance Profiler, Monitor, Optimize, Compress & Debug icon 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.