From fc5b4f0482f595df3f8613603b9ca6c3cdc4136d Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 31 May 2017 12:03:16 +0100 Subject: [PATCH] Only show no_shipping_methods notice if services is not being installed --- includes/admin/class-wc-admin-setup-wizard.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/admin/class-wc-admin-setup-wizard.php b/includes/admin/class-wc-admin-setup-wizard.php index 36372657894..cb7e44810a5 100644 --- a/includes/admin/class-wc-admin-setup-wizard.php +++ b/includes/admin/class-wc-admin-setup-wizard.php @@ -588,7 +588,6 @@ class WC_Admin_Setup_Wizard { update_option( 'woocommerce_ship_to_countries', '' ); update_option( 'woocommerce_weight_unit', $weight_unit ); update_option( 'woocommerce_dimension_unit', $dimension_unit ); - WC_Admin_Notices::add_notice( 'no_shipping_methods' ); /* * If this is the initial shipping setup, create a shipping @@ -614,6 +613,8 @@ class WC_Admin_Setup_Wizard { 'repo-slug' => 'woocommerce-services', ); wp_schedule_single_event( time() + 10, 'woocommerce_plugin_background_installer', array( $services_plugin_id, $services_plugin ) ); + } else { + WC_Admin_Notices::add_notice( 'no_shipping_methods' ); } wp_redirect( esc_url_raw( $this->get_next_step_link() ) );