Translations::__construct()publicWC 1.0

Constructor. Hooks added here should be removed in wc_admin_initialize via the feature plugin.

Method of the class: Translations{}

No Hooks.


null. Nothing (null).


$Translations = new Translations();

Translations::__construct() code WC 8.7.0

public function __construct() {
	add_action( 'admin_enqueue_scripts', array( $this, 'potentially_load_translation_script_file' ), 15 );

	// Combine JSON translation files (from chunks) when language packs are updated.
	add_action( 'upgrader_process_complete', array( $this, 'combine_translation_chunk_files' ), 10, 2 );

	// Handler for WooCommerce and WooCommerce Admin plugin activation.
	add_action( 'woocommerce_activated_plugin', array( $this, 'potentially_generate_translation_strings' ) );
	add_action( 'activated_plugin', array( $this, 'potentially_generate_translation_strings' ) );