Automattic\WooCommerce\Internal\Admin
Translations::potentially_generate_translation_strings()
Run when plugin is activated (can be WooCommerce or WooCommerce Admin).
Method of the class: Translations{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Translations = new Translations(); $Translations->potentially_generate_translation_strings( $filename );
- $filename(string) (required)
- Activated plugin filename.
Translations::potentially_generate_translation_strings() Translations::potentially generate translation strings code WC 9.7.1
public function potentially_generate_translation_strings( $filename ) { $activated_plugin_domain = explode( '/', $filename )[0]; // Ensure we're only running only on activation hook that originates from our plugin. if ( self::$plugin_domain === $activated_plugin_domain ) { $this->generate_translation_strings(); } }