Merge pull request #21072 from woocommerce/fix/21071

Hide activate step in wizard when you cannot install plugins
This commit is contained in:
Claudiu Lodromanean 2018-08-16 12:55:41 -07:00 committed by GitHub
commit 7a0b15b9ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -193,6 +193,11 @@ class WC_Admin_Setup_Wizard {
unset( $default_steps['shipping'] );
}
// Hide activate section when the user does not have capabilities to install plugins, think multiside admins not being a super admin.
if ( ! current_user_can( 'install_plugins' ) ) {
unset( $default_steps['activate'] );
}
// Whether or not there is a pending background install of Jetpack.
$pending_jetpack = ! class_exists( 'Jetpack' ) && get_option( 'woocommerce_setup_background_installing_jetpack' );