0) { if (isset($_POST['store_settings'])) { check_admin_referer( 'answerbase_settings_form' ); $answerbase_settings = get_option('answerbase_settings', wc_answerbase_get_default_settings()); $answerbase_settings['location'] = $_POST['answerbase_location']; $answerbase_settings['tab_name'] = $_POST['answerbase_tab_name']; update_option('answerbase_settings', $answerbase_settings); wc_answerbase_gui_settings(); } else { if (isset($_GET['s_id']) && isset($_GET['m_id'])) { $answerbase_settings = get_option('answerbase_settings', wc_answerbase_get_default_settings()); $answerbase_settings['service_url'] = $_GET['s_id']; $answerbase_settings['admin_url'] = $_GET['m_id']; update_option('answerbase_settings', $answerbase_settings); wc_answerbase_gui_settings(); } else { if (wc_answerbase_is_registered()) { wc_answerbase_gui_settings(); } else { $url = "https://answerbase.com/Woocommerce/ConnectToStore?"; $url .= 'storeName=' . get_bloginfo('name'); $url .= "&"; $url .= 'storeUrl=' . urlencode($_SERVER['SERVER_NAME']); $url .= "&"; $url .= 'adminEmail=' . get_bloginfo('admin_email'); $url .= "&"; $url .= 'returnUrl=' . urlencode((isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"); echo sprintf("", $url); } } } } else { echo "

The required PHP version is at least 5.2"; } } function wc_answerbase_gui_settings(){ $answerbase_settings = get_option('answerbase_settings', wc_answerbase_get_default_settings()); $settings_html = "
" .screen_icon( ). "

Answerbase Settings

"; if (isset($_GET['s_id']) && isset($_GET['m_id'])) { $settings_html .= "

Answerbase has been successfully installed on your store.

"; } $settings_html .= "

You can adjust your Answebase settings below.

". wp_nonce_field('answerbase_settings_form'). "
Choose widget location

Please do the following to place your widget in desired location:

1. Find \"Plugins\" on the left navigation and select \"Editor\".
2. On the top you'll see a dropdown where you can \"Select plugin to edit\", select the Woocommerce option
3. Click on the \"templates\" option to expand that menu
4. Click on the \"content-single-product.php\" page
5. From here, you can paste the line \"wc_answerbase_get_widget\" whereever you'd like the widget displayed

If you need any help with installation, you can contact our support team to assist in setup by emailing support@answerbase.com

Select tab name:

This is a title of the tab on that will be rendered on product's page.



To manage your content and the full administration interface, go to Answerbase Administration Portal

"; echo $settings_html; } ?>