Merge pull request #14468 from woocommerce/fix/14361
Fixed support for WordPress 4.7 user site locale
This commit is contained in:
commit
1f4b791d6a
|
@ -456,7 +456,8 @@ final class WooCommerce {
|
|||
* - WP_LANG_DIR/plugins/woocommerce-LOCALE.mo
|
||||
*/
|
||||
public function load_plugin_textdomain() {
|
||||
$locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce' );
|
||||
$locale = is_admin() && function_exists( 'get_user_locale' ) ? get_user_locale() : get_locale();
|
||||
$locale = apply_filters( 'plugin_locale', $locale, 'woocommerce' );
|
||||
|
||||
load_textdomain( 'woocommerce', WP_LANG_DIR . '/woocommerce/woocommerce-' . $locale . '.mo' );
|
||||
load_plugin_textdomain( 'woocommerce', false, plugin_basename( dirname( __FILE__ ) ) . '/i18n/languages' );
|
||||
|
|
Loading…
Reference in New Issue