Automattic\WooCommerce\Internal\Admin

Translations::potentially_load_translation_script_file()publicWC 1.0

Loads the required translation scripts on the correct pages.

{} It's a method of the class: Translations{}

No Hooks.

Return

null. Nothing.

Usage

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

Code of Translations::potentially_load_translation_script_file() WC 7.1.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 );
}