WC_Theme_Tracking::track_activated_theme()
Send a Tracks event when a theme is activated so that we can track active block themes.
Method of the class: WC_Theme_Tracking{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Theme_Tracking = new WC_Theme_Tracking(); $WC_Theme_Tracking->track_activated_theme();
WC_Theme_Tracking::track_activated_theme() WC Theme Tracking::track activated theme code WC 9.3.1
public function track_activated_theme() { $is_block_theme = false; $theme_object = wp_get_theme(); if ( function_exists( 'wc_current_theme_is_fse_theme' ) ) { $is_block_theme = wc_current_theme_is_fse_theme(); } $properties = array( 'block_theme' => $is_block_theme, 'theme_name' => $theme_object->get( 'Name' ), 'theme_version' => $theme_object->get( 'Version' ), ); WC_Tracks::record_event( 'activated_theme', $properties ); }