Automattic\WooCommerce\Admin\PluginsInstallLoggers

AsyncPluginsInstallLogger::get_plugin_track_key()privateWC 1.0

Method of the class: AsyncPluginsInstallLogger{}

No Hooks.

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->get_plugin_track_key( $id );
$id (required)
-

AsyncPluginsInstallLogger::get_plugin_track_key() code WC 9.0.1

private function get_plugin_track_key( $id ) {
	$slug = explode( ':', $id )[0];
	$key  = preg_match( '/^woocommerce(-|_)payments$/', $slug )
		? 'wcpay'
		: explode( ':', str_replace( '-', '_', $slug ) )[0];
	return $key;
}