Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions wp-user-activity/includes/actions/class-action-themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ public function theme_install_or_update( $upgrader, $extra ) {
wp_clean_themes_cache();

$theme = wp_get_theme( $slug );
$name = $theme->name;
$version = $theme->version;
$name = $theme->get( 'Name' );
$version = $theme->get( 'Version' );

// Insert activity
wp_insert_user_activity( array(
Expand All @@ -391,12 +391,15 @@ public function theme_install_or_update( $upgrader, $extra ) {
$slugs = array();
}

// Clear the theme cache to ensure fresh data
wp_clean_themes_cache();

// Activity for each theme
foreach ( $slugs as $slug ) {

$theme = wp_get_theme( $slug );
$name = $theme->name;
$version = $theme->version;
$name = $theme->get( 'Name' );
$version = $theme->get( 'Version' );

// Insert activity
wp_insert_user_activity( array(
Expand Down