Skip to content

Commit

Permalink
Merge pull request #3533 from 10up/fix/failed-logs-automatically-clea…
Browse files Browse the repository at this point in the history
…r-on-page-refresh

Fix: Failed Query logs automatically cleared on page refresh
  • Loading branch information
felipeelia authored Jul 5, 2023
2 parents cb47bb1 + 8fcf6fe commit a5f8ec3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions includes/classes/StatusReport/FailedQueries.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ protected function maybe_clear_logs() {
}

$this->query_logger->clear_logs();

if ( defined( 'EP_IS_NETWORK' ) && EP_IS_NETWORK ) {
$redirect_url = network_admin_url( 'admin.php?page=elasticpress-status-report' );
} else {
$redirect_url = admin_url( 'admin.php?page=elasticpress-status-report' );
}

wp_safe_redirect( $redirect_url );
exit();
}

/**
Expand Down

0 comments on commit a5f8ec3

Please sign in to comment.