Inject translations after i18n is included, so we catch the earliest instance of translation functionality (https://github.com/woocommerce/woocommerce-admin/pull/782)

This commit is contained in:
Kelly Dwan 2018-11-05 17:09:20 -05:00 committed by Kevin Killingsworth
parent d27cb26ef7
commit 1716ebcdae
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ function wc_admin_register_script() {
// Set up the text domain and translations.
$locale_data = gutenberg_get_jed_locale_data( 'wc-admin' );
$content = 'wp.i18n.setLocaleData( ' . json_encode( $locale_data ) . ', "wc-admin" );';
wp_add_inline_script( 'wc-components', $content, 'before' );
wp_add_inline_script( 'wp-i18n', $content, 'after' );
// Resets lodash to wp-admin's version of lodash.
wp_add_inline_script(