Automattic\WooCommerce\Admin\PluginsInstallLoggers
AsyncPluginsInstallLogger::get_plugin_track_key
Method of the class: AsyncPluginsInstallLogger{}
No Hooks.
Returns
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() AsyncPluginsInstallLogger::get plugin track key code WC 10.7.0
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;
}