plugin_locale

Filters a plugin's locale.

Description

apply_filters( 'plugin_locale', $get_locale, (string) $woocommerce_moip ); 

Parameters (2)

0. $get_locale
The get locale.
1. $woocommerce_moip (string) => 'woocommerce-moip'
The woocommerce moip.

Usage

To run the hook, copy the example below.
  1. $get_locale = apply_filters( 'plugin_locale', $get_locale, $woocommerce_moip ); 
  2.  
  3. if ( !empty( $get_locale ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the plugin_locale callback 
  2. function filter_plugin_locale( $get_locale, $woocommerce_moip ) { 
  3. // make filter magic happen here... 
  4. return $get_locale
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'plugin_locale', 'filter_plugin_locale', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'plugin_locale', 'filter_plugin_locale', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/woocommerce-moip.php  
  1. $locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce-moip' );