Merge pull request #17106 from woocommerce/fix/activate-step-when-returning-from-wpcom

Setup wizard: activate step shouldn't be hidden after a successful WPCOM connection.
This commit is contained in:
Claudio Sanches 2017-10-09 16:59:53 -03:00 committed by GitHub
commit 87cf8f4809
1 changed files with 8 additions and 2 deletions

View File

@ -132,8 +132,14 @@ class WC_Admin_Setup_Wizard {
unset( $default_steps['shipping'] );
}
// Hide the activate step if Jetpack is already active.
if ( class_exists( 'Jetpack' ) && Jetpack::is_active() ) {
// Hide the activate step if Jetpack is already active, but not
// 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'] );
}