Only show no_shipping_methods notice if services is not being installed

This commit is contained in:
Mike Jolley 2017-05-31 12:03:16 +01:00 committed by Nabeel Sulieman
parent c25b844761
commit fc5b4f0482
1 changed files with 2 additions and 1 deletions

View File

@ -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() ) );