Onboarding: Remove check for legacy onboarding in redirect logic. (https://github.com/woocommerce/woocommerce-admin/pull/5230)

This commit is contained in:
Timmy Crawford 2020-10-01 06:08:41 -07:00 committed by GitHub
parent f08ccc57d7
commit 6db5126771
1 changed files with 0 additions and 2 deletions

View File

@ -136,7 +136,6 @@ class Onboarding {
$do_redirect = true;
$current_page = isset( $_GET['page'] ) ? wc_clean( wp_unslash( $_GET['page'] ) ) : false; // phpcs:ignore WordPress.Security.NonceVerification
$is_onboarding_path = ! isset( $_GET['path'] ) || '/setup-wizard' === wc_clean( wp_unslash( $_GET['page'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
$is_legacy_onboarding_complete = class_exists( '\WC_Admin_Notices' ) && ! \WC_Admin_Notices::has_notice( 'install' );
// On these pages, or during these events, postpone the redirect.
if ( wp_doing_ajax() || is_network_admin() || ! current_user_can( 'manage_woocommerce' ) ) {
@ -146,7 +145,6 @@ class Onboarding {
// On these pages, or during these events, disable the redirect.
if (
( 'wc-admin' === $current_page && $is_onboarding_path ) ||
$is_legacy_onboarding_complete ||
apply_filters( 'woocommerce_prevent_automatic_wizard_redirect', false ) ||
isset( $_GET['activate-multi'] ) // phpcs:ignore WordPress.Security.NonceVerification
) {