Show WCS and Jetpack only if they are not aleady active

This commit is contained in:
Paul Dechov 2018-05-02 23:49:58 -04:00
parent 9cd72562a8
commit 64a47cd7cd
1 changed files with 8 additions and 4 deletions

View File

@ -692,10 +692,14 @@ class WC_Admin_Setup_Wizard {
}
protected function get_wcs_requisite_plugins() {
return array(
array( 'name' => __( 'WooCommerce Services', 'woocommerce' ), 'slug' => 'woocommerce-services' ),
array( 'name' => __( 'Jetpack', 'woocommerce' ), 'slug' => 'jetpack' ),
);
$plugins = array();
if ( ! is_plugin_active( 'woocommerce-services/woocommerce-services.php' ) ) {
$plugins[] = array( 'name' => __( 'WooCommerce Services', 'woocommerce' ), 'slug' => 'woocommerce-services' );
}
if ( ! is_plugin_active( 'jetpack/jetpack.php' ) ) {
$plugins[] = array( 'name' => __( 'Jetpack', 'woocommerce' ), 'slug' => 'jetpack' );
}
return $plugins;
}
/**