WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

Automattic\WooCommerce\Admin

Loader::generate_translation_strings() public WC 1.0

Combine translation chunks when plugin is activated.

This function combines JSON translation data auto-extracted by GlotPress from Webpack-generated JS chunks into a single file. This is necessary since the JS chunks are not known to WordPress via wp_register_script() and wp_set_script_translations().

{} Это метод класса: Loader{}

Хуков нет.

Возвращает

Null. Ничего.

Использование

$result = Loader::generate_translation_strings();

Код Loader::generate_translation_strings() WC 5.0.0

<?php
public static function generate_translation_strings() {
	$plugin_domain = explode( '/', plugin_basename( __FILE__ ) )[0];
	$locale        = determine_locale();
	$lang_dir      = WP_LANG_DIR . '/plugins/';

	// Bail early if not localized.
	if ( 'en_US' === $locale ) {
		return;
	}

	if ( ! function_exists( 'get_filesystem_method' ) ) {
		require_once ABSPATH . 'wp-admin/includes/file.php';
	}

	$access_type = get_filesystem_method();
	if ( 'direct' === $access_type ) {
		\WP_Filesystem();
		self::build_and_save_translations( $lang_dir, $plugin_domain, $locale );
	} else {
		// I'm reluctant to add support for other filesystems here as it would require
		// user's input on activating plugin - which I don't think is common.
		return;
	}
}