plugin_locale │ filter-hook │ WC 1.0

This is a Advanced Custom Fields PRO - plugin_locale hook. The plugin just uses it.

Filter to adjust the WooCommerce locale to use for translations.

Usage

add_filter( 'plugin_locale', 'wp_kama_plugin_locale_filter', 10, 2 );

/**
 * Function for `plugin_locale` filter-hook.
 * 
 * @param string $locale The plugin's current locale.
 * @param string $domain Text domain. Unique identifier for retrieving translated strings.
 *
 * @return string
 */
function wp_kama_plugin_locale_filter( $locale, $domain ){
	// filter...
	return $locale;
}
$locale(string)
The plugin's current locale.
$domain(string)
Text domain. Unique identifier for retrieving translated strings.

Where the hook is called

WooCommerce::load_plugin_textdomain()
plugin_locale
woocommerce/includes/class-woocommerce.php 1092
$locale                  = apply_filters( 'plugin_locale', determine_locale(), 'woocommerce' ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingSinceComment

Where the hook is used in WooCommerce

woocommerce/includes/wc-core-functions.php 2181
add_filter( 'plugin_locale', 'get_locale' );
woocommerce/includes/wc-core-functions.php 2201
remove_filter( 'plugin_locale', 'get_locale' );