Setup wizard: check for activate-step-specific GET parameters before hiding the step.

This was a bit overzealous, and broke successful connection flows from the wizard. (Introduced in 97faa49fc4)
This commit is contained in:
Jeff Stieler 2017-10-09 08:55:30 -06:00
parent 1831d7ec37
commit c5f097f319
1 changed files with 8 additions and 2 deletions

View File

@ -132,8 +132,14 @@ class WC_Admin_Setup_Wizard {
unset( $default_steps['shipping'] ); unset( $default_steps['shipping'] );
} }
// Hide the activate step if Jetpack is already active. // Hide the activate step if Jetpack is already active, but not
if ( class_exists( 'Jetpack' ) && Jetpack::is_active() ) { // if we're returning from connecting Jetpack on WordPress.com.
if (
class_exists( 'Jetpack' ) &&
Jetpack::is_active() &&
! isset( $_GET['from'] ) &&
! isset( $_GET['activate_error'] )
) {
unset( $default_steps['activate'] ); unset( $default_steps['activate'] );
} }