Automattic\WooCommerce\Internal\Admin

Translations::potentially_load_translation_script_file()publicWC 1.0

Loads the required translation scripts on the correct pages.

Method of the class: Translations{}

No Hooks.

Return

null. Nothing (null).

Usage

$Translations = new Translations();
$Translations->potentially_load_translation_script_file();

Translations::potentially_load_translation_script_file() code WC 8.7.0

public function potentially_load_translation_script_file() {
	if ( ! PageController::is_admin_or_embed_page() ) {
		return;
	}

	// Grab translation strings from Webpack-generated chunks.
	add_filter( 'load_script_translation_file', array( $this, 'load_script_translation_file' ), 10, 3 );
}