Add Tracks event for themes screen view (#40193)
* Add Tracks event for themes screen view * Add changelog * Use the load-themes.php hook
This commit is contained in:
parent
c661186499
commit
745dfe44a6
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: add
|
||||
|
||||
Add Tracks events to Appearance > Themes screen
|
|
@ -93,6 +93,8 @@ class Loader {
|
|||
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
|
||||
|
||||
add_action( 'admin_init', array( __CLASS__, 'deactivate_wc_admin_plugin' ) );
|
||||
|
||||
add_action( 'load-themes.php', array( __CLASS__, 'add_appearance_theme_view_tracks_event' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -571,4 +573,11 @@ class Loader {
|
|||
delete_option( 'woocommerce_onboarding_homepage_post_id' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the appearance_theme_view Tracks event.
|
||||
*/
|
||||
public static function add_appearance_theme_view_tracks_event() {
|
||||
wc_admin_record_tracks_event( 'appearance_theme_view', array() );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue