Skip to content

Commit

Permalink
fix: rollback for themes WP6.3
Browse files Browse the repository at this point in the history
References: Codeinwp/neve-pro-addon#2791
  • Loading branch information
preda-bogdan committed Apr 2, 2024
1 parent d2ed2ef commit 5de14de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Modules/Rollback.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ private function start_rollback_theme() {
add_filter( 'update_theme_complete_actions', array( $this, 'alter_links_theme_upgrade' ) );
$rollback = $this->get_rollback();
$transient = get_site_transient( 'update_themes' );
$folder = $this->product->get_slug();
$slug = $this->product->get_slug();
$folder = $slug;
$version = $rollback['version'];
$temp_array = array(
'new_version' => $version,
Expand All @@ -285,7 +286,7 @@ private function start_rollback_theme() {
$url = 'update.php?action=upgrade-theme&theme=' . urlencode( $theme );

$upgrader = new \Theme_Upgrader( new \Theme_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'theme' ) ) );
$upgrader->upgrade( $theme );
$upgrader->upgrade( $slug );
delete_transient( $this->product->get_key() . '_warning_rollback' );
wp_die(
'',
Expand Down

0 comments on commit 5de14de

Please sign in to comment.