diff --git a/includes/admin/class-wc-admin-setup-wizard.php b/includes/admin/class-wc-admin-setup-wizard.php index ce6146277f4..2aef76efe1b 100644 --- a/includes/admin/class-wc-admin-setup-wizard.php +++ b/includes/admin/class-wc-admin-setup-wizard.php @@ -65,11 +65,6 @@ class WC_Admin_Setup_Wizard { 'view' => array( $this, 'wc_setup_payments' ), 'handler' => array( $this, 'wc_setup_payments_save' ), ), - 'location' => array( - 'name' => __( 'Store location', 'woocommerce' ), - 'view' => array( $this, 'wc_setup_location' ), - 'handler' => array( $this, 'wc_setup_location_save' ), - ), 'shipping' => array( 'name' => __( 'Shipping', 'woocommerce' ), 'view' => array( $this, 'wc_setup_shipping' ), @@ -348,229 +343,6 @@ class WC_Admin_Setup_Wizard { exit; } - /** - * Location and Tax settings. - */ - public function wc_setup_location() { - $address = WC()->countries->get_base_address(); - $address_2 = WC()->countries->get_base_address_2(); - $city = WC()->countries->get_base_city(); - $state = WC()->countries->get_base_state(); - $country = WC()->countries->get_base_country(); - $postcode = WC()->countries->get_base_postcode(); - - if ( empty( $country ) ) { - $user_location = WC_Geolocation::geolocate_ip(); - $country = ! empty( $user_location['country'] ) ? $user_location['country'] : 'US'; - $state = ! empty( $user_location['state'] ) ? $user_location['state'] : '*'; - $state = 'US' === $country && '*' === $state ? 'AL' : $state; - } - - if ( empty( $state ) ) { - $state = '*'; - } - - // Defaults. - $currency = get_option( 'woocommerce_currency', 'GBP' ); - $currency_pos = get_option( 'woocommerce_currency_pos', 'left' ); - $decimal_sep = get_option( 'woocommerce_price_decimal_sep', '.' ); - $num_decimals = get_option( 'woocommerce_price_num_decimals', '2' ); - $thousand_sep = get_option( 'woocommerce_price_thousand_sep', ',' ); - ?> -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- - add it later.', 'woocommerce' ), 'https://docs.woocommerce.com/document/add-a-custom-currency-symbol/' ); ?> -
- -
- -
- -
- -
- id="woocommerce_calc_taxes" name="woocommerce_calc_taxes" class="input-checkbox" value="1" /> - -
-
- -
-

- - - -

-
- plugin_path() . '/i18n/locale-info.php' ); - $tax_rates = array(); - $country = WC()->countries->get_base_country(); - $state = WC()->countries->get_base_state(); - - if ( isset( $locale_info[ $country ] ) ) { - if ( isset( $locale_info[ $country ]['tax_rates'][ $state ] ) ) { - $tax_rates = $locale_info[ $country ]['tax_rates'][ $state ]; - } elseif ( isset( $locale_info[ $country ]['tax_rates'][''] ) ) { - $tax_rates = $locale_info[ $country ]['tax_rates']['']; - } - if ( isset( $locale_info[ $country ]['tax_rates']['*'] ) ) { - $tax_rates = array_merge( $locale_info[ $country ]['tax_rates']['*'], $tax_rates ); - } - } - if ( $tax_rates ) { - $loop = 0; - foreach ( $tax_rates as $rate ) { - $tax_rate = array( - 'tax_rate_country' => $rate['country'], - 'tax_rate_state' => $rate['state'], - 'tax_rate' => $rate['rate'], - 'tax_rate_name' => $rate['name'], - 'tax_rate_priority' => isset( $rate['priority'] ) ? absint( $rate['priority'] ) : 1, - 'tax_rate_compound' => 0, - 'tax_rate_shipping' => $rate['shipping'] ? 1 : 0, - 'tax_rate_order' => $loop ++, - 'tax_rate_class' => '', - ); - WC_Tax::_insert_tax_rate( $tax_rate ); - } - } - } - - wp_redirect( esc_url_raw( $this->get_next_step_link() ) ); - exit; - } - /** * Tout WooCommerce Services for North American stores. */