WC_Theme_Tracking::track_activated_theme()publicWC 1.0

Send a Tracks event when a theme is activated so that we can track active block themes.

{} Это метод класса: WC_Theme_Tracking{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$WC_Theme_Tracking = new WC_Theme_Tracking();
$WC_Theme_Tracking->track_activated_theme();

Код WC_Theme_Tracking::track_activated_theme() WC 6.9.4

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 );
}