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:
parent
d27cb26ef7
commit
1716ebcdae
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue