plugin_locale filter-hook . WC 1.0
Load Localisation files.
Note: the first-loaded translation file overrides any following ones if the same translation is present.
Locales found in:
- WP_LANG_DIR/woocommerce/woocommerce-LOCALE.mo - WP_LANG_DIR/plugins/woocommerce-LOCALE.mo
Usage
add_filter( 'plugin_locale', 'filter_function_name_6554', 10, 2 ); function filter_function_name_6554( $locale, $string ){ // filter... return $locale; }
- $locale
- -
- $string
- -
Where the hook is called
plugin_locale
woocommerce/includes/class-woocommerce.php 612
$locale = apply_filters( 'plugin_locale', $locale, 'woocommerce' );
Where in WP core the hook is used WooCommerce
woocommerce/includes/wc-core-functions.php 2143
add_filter( 'plugin_locale', 'get_locale' );
woocommerce/includes/wc-core-functions.php 2160
remove_filter( 'plugin_locale', 'get_locale' );