public function init_form_fields()
 {
     if (!$this->on_settings_page()) {
         return;
     }
     $default_wc_settings = explode(':', get_option('woocommerce_default_country'));
     add_action('admin_enqueue_scripts', array($this, 'load_taxjar_admin_assets'));
     $tj_connection = new WC_TaxJar_Connection($this);
     if (empty($default_wc_settings[1])) {
         $default_wc_settings[1] = "N/A";
     }
     // Build the form array
     $this->form_fields = array('taxjar_title_step_1' => array('title' => __('<h3>Step 1:</h3>', 'wc-taxjar'), 'type' => 'hidden', 'description' => '<h3>Activate your TaxJar WooCommerce Plugin</h3>'), 'api_token' => array('title' => __('API Token', 'wc-taxjar'), 'type' => 'text', 'description' => __('<a href="' . $this->app_uri . 'account#api-access" target="_blank">Click here</a> to get your API token.', 'wc-taxjar'), 'desc_tip' => false, 'default' => ''));
     if (!$tj_connection->can_connect || !$tj_connection->api_token_valid) {
         $this->form_fields = array_merge($this->form_fields, array('taxjar_status' => $tj_connection->get_form_settings_field()));
     }
     if ($this->post_or_setting('api_token') && $tj_connection->api_token_valid) {
         $this->form_fields = array_merge($this->form_fields, array('taxjar_title_step_2' => array('title' => __('<h3>Step 2:</h3>', 'wc-taxjar'), 'type' => 'hidden', 'description' => '<h3>Configure your sales tax settings</h3>'), 'enabled' => array('title' => __('Sales Tax Calculation', 'wc-taxjar'), 'type' => 'checkbox', 'label' => __('Enable TaxJar Calculations', 'wc-taxjar'), 'default' => 'no', 'description' => __('If enabled, TaxJar will calculate all sales tax for your store.', 'wc-taxjar'))));
         if ($this->post_or_setting('enabled')) {
             $tj_nexus = new WC_Taxjar_Nexus($this);
             $this->form_fields = array_merge($this->form_fields, array('nexus' => $tj_nexus->get_form_settings_field()));
         }
         $this->form_fields = array_merge($this->form_fields, array('taxjar_download' => $this->download_orders->get_form_settings_field(), 'store_zip' => array('title' => __('Ship From Zip Code', 'wc-taxjar'), 'type' => 'text', 'description' => __('Enter the zip code from which your store ships products.', 'wc-taxjar'), 'desc_tip' => true, 'default' => ''), 'store_city' => array('title' => __('Ship From City', 'wc-taxjar'), 'type' => 'text', 'description' => __('Enter the city where your store ships from.', 'wc-taxjar'), 'desc_tip' => true, 'default' => ''), 'store_state' => array('title' => __('Ship From State', 'wc-taxjar'), 'type' => 'hidden', 'description' => __('We have automatically detected your ship from state as being ' . $default_wc_settings[1] . '.', 'wc-taxjar'), 'class' => 'input-text disabled regular-input', 'disabled' => 'disabled'), 'store_country' => array('title' => __('Ship From Country', 'wc-taxjar'), 'type' => 'hidden', 'description' => __('We have automatically detected your ship from country as being ' . $default_wc_settings[0] . '.', 'wc-taxjar'), 'class' => 'input-text disabled regular-input', 'disabled' => 'disabled'), 'debug' => array('title' => __('Debug Log', 'wc-taxjar'), 'type' => 'checkbox', 'label' => __('Enable logging', 'wc-taxjar'), 'default' => 'no', 'description' => __('Log events such as API requests.', 'wc-taxjar'))));
     }
 }