PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 3.9.6
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v3.9.6
8.7.8 8.7.7 8.7.6 8.7.5 8.7.4 8.7.3 8.7.2 8.7.1 8.7.0 8.6.9 8.6.8 8.6.7 8.6.6 8.6.5 8.6.4 8.6.2 8.6.1 8.6.0 8.5.9 8.5.8 8.5.7 8.5.6 8.5.5 8.5.4 8.5.3 All 534 releases
chatbot / qcld-wpwbot.php

qcld-wpwbot.php in WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services 3.9.6, at qcld-wpwbot.php

2,946 lines 173.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: ChatBot
4 * Plugin URI: https://wordpress.org/plugins/chatbot/
5 * Description: ChatBot is a native WordPress ChatBot plugin to provide quick support and email functionality.
6 * Donate link: https://www.quantumcloud.com
7 * Version: 3.9.6
8 * @author QuantumCloud
9 * Author: QuantumCloud
10 * Author URI: https://www.quantumcloud.com/
11 * Requires at least: 4.6
12 * Tested up to: 5.9
13 * Text Domain: wpbot
14 * Domain Path: /lang
15 * License: GPL2
16 */
17
18
19
20 if (!defined('ABSPATH')) exit; // Exit if accessed directly
21 define('QCLD_wpCHATBOT_VERSION', '3.9.6');
22 define('QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION', 2.2);
23 define('QCLD_wpCHATBOT_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
24 define('QCLD_wpCHATBOT_PLUGIN_URL', plugin_dir_url(__FILE__));
25 define('QCLD_wpCHATBOT_IMG_URL', QCLD_wpCHATBOT_PLUGIN_URL . "images/");
26 define('QCLD_wpCHATBOT_IMG_ABSOLUTE_PATH', plugin_dir_path(__FILE__) . "images");
27 define('QCLD_wpCHATBOT_INDEX_TABLE', 'wpwbot_index');
28 //define('QCLD_wpCHATBOT_CACHE_TABLE', 'wpwbot_cache');
29
30 $gcdirpath = __DIR__.'/../../wpbot-dfv2-client';
31 define('QCLD_wpCHATBOT_GC_DIRNAME', $gcdirpath);
32 $wpcontentpath = __DIR__.'/../../';
33 define('QCLD_wpCHATBOT_GC_ROOT', $wpcontentpath);
34
35 require_once("qcld-wpwbot-search.php");
36 require_once("class-qc-free-plugin-upgrade-notice.php");
37 require_once("class-plugin-deactivate-feedback.php");
38 require_once("qc-support-promo-page/class-qc-support-promo-page.php");
39 require_once(QCLD_wpCHATBOT_PLUGIN_DIR_PATH."/functions.php");
40 require_once('qcld_df_api.php');
41 require_once('includes/class-wpbot-gc-download.php');
42 require_once('includes/class-response-list.php');
43 require_once('qc-rating-feature/qc-rating-class.php');
44
45 /*
46 if(file_exists(QCLD_wpCHATBOT_PLUGIN_DIR_PATH. "/conversion-tracker/class-qc-conversion-tracker.php")){
47 require_once (QCLD_wpCHATBOT_PLUGIN_DIR_PATH. "/conversion-tracker/class-qc-conversion-tracker.php");
48 }
49 */
50 /**
51 * Main Class.
52 */
53 class qcld_wb_Chatbot
54 {
55 private $id = 'wpbot';
56 private static $instance;
57 public $mysql_version = '';
58 /**
59 * Get Instance creates a singleton class that's cached to stop duplicate instances
60 */
61 public static function qcld_wb_chatbot_get_instance()
62 {
63 if (!self::$instance) {
64 self::$instance = new self();
65 self::$instance->qcld_wb_chatbot_init();
66 }
67 return self::$instance;
68 }
69 /**
70 * Construct empty on purpose
71 */
72 private function __construct()
73 {
74 }
75 /**
76 * Init behaves like, and replaces, construct
77 */
78 public function qcld_wb_chatbot_init()
79 {
80 // Check if wpCommerce is active, and is required wpCommerce version.
81 /*if (!class_exists('wpCommerce') || version_compare(get_option('wpcommerce_db_version'), QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION, '<')) {
82 add_action('admin_notices', array($this, 'wpcommerce_inactive_notice_for_wp_chatbot'));
83 return;
84 }*/
85 add_action('admin_menu', array($this, 'qcld_wb_chatbot_admin_menu'));
86 if ((!empty($_GET["page"])) && ($_GET["page"] == "wpbot")) {
87 add_action('admin_init', array($this, 'qcld_wb_chatbot_save_options'));
88 }
89 if (is_admin() && !empty($_GET["page"]) && ($_GET["page"] == "wpbot") || (!empty($_GET['page']) && $_GET['page']=='wpbot_help_page') || (!empty($_GET['page']) && $_GET['page']=='wpbot-panel') || ( !empty($_GET['page']) && $_GET["page"] == "wbcs-botsessions-page") ) {
90 add_action('admin_enqueue_scripts', array($this, 'qcld_wb_chatbot_admin_scripts'));
91 if( get_option('wp_chatbot_index_count')<=0 && get_option('qlcd_wp_chatbot_search_option')=='advanced'){
92 add_action( 'admin_notices', array( $this, 'admin_notice_reindex' ) );
93 }
94 }
95
96 //loading frontend scripts
97 add_action('wp', array($this, 'qcld_wpchatbot_init_fnc'));
98 add_action('init', array($this, 'qcld_wpchatbot_init2_fnc'));
99
100
101 }
102
103
104
105 public function qcld_wpchatbot_init_fnc(){
106 if (!is_admin() && get_option('disable_wp_chatbot') != 1 && wp_chatbot_load_controlling() === true) {
107 add_action('wp_enqueue_scripts', array($this, 'qcld_wb_chatbot_frontend_scripts'));
108 }
109 }
110 public function qcld_wpchatbot_init2_fnc(){
111
112 if( is_admin() ){
113
114 $connection = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
115 if($connection === false){
116 return;
117 }
118 $content = $connection->server_info;
119
120 preg_match_all('/\d+\.\d+/', $content, $matches);
121
122 if( !empty( $matches ) && isset( $matches[0] ) && !empty( $matches[0] ) && is_array( $matches[0] ) ){
123 $versions = $matches[0];
124 $notice = true;
125 foreach( $versions as $version ){
126 if (version_compare($version, '5.5', '>')) {
127 $this->mysql_version = $version;
128 $notice = false;
129 }else{
130 $this->mysql_version = $version;
131 }
132 }
133
134 if( $notice ){
135 add_action('admin_notices', array($this, 'mysql_version_notice') );
136 }
137
138 }
139
140 $connection->close();
141 }
142 }
143
144 public function mysql_version_notice(){
145 $class="notice notice-error is-dismissible qc-notice-error";
146 $message = "Your server's MySQL version is **".$this->mysql_version."**. MySQL version 5.6+ is required for Simple Text Responses to work. Please contact your hosting support to upgrade the MySQL to the latest version.";
147 printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), $message );
148 }
149
150 /**
151 * Add a submenu item to the wpCommerce menu
152 */
153 public function qcld_wb_chatbot_admin_menu()
154 {
155 /* add_submenu_page('wpcommerce',
156 __('wpwBot Pro', 'wpchatbot'),
157 __('wpwBot Pro', 'wpchatbot'),
158 'manage_wpcommerce',
159 $this->id,
160 array($this, 'qcld_wb_chatbot_admin_page'));*/
161
162 add_menu_page( esc_html('WPBot Lite'), esc_html('WPBot Lite'), 'manage_options','wpbot-panel', array($this, 'qcld_wb_chatbot_admin_page'),'dashicons-format-status', 6 );
163
164 add_submenu_page( 'wpbot-panel', esc_html('Settings'), esc_html('Settings'), 'manage_options','wpbot', array($this, 'qcld_wb_chatbot_admin_page_settings') );
165
166 $hook = add_submenu_page( 'wpbot-panel', esc_html('Simple Text Responses'), esc_html('Simple Text Responses'), 'manage_options','simple-text-response', array($this, 'qcld_wb_chatbot_admin_str') );
167
168 add_action( "load-$hook", [ $this, 'screen_option' ] );
169
170 add_submenu_page( 'wpbot-panel', esc_html('Support'), esc_html('Support'), 'manage_options','wpbot_support_page', 'qcpromo_support_page_callback_func' );
171
172 add_submenu_page( 'wpbot-panel', esc_html('Help and Debugging'), esc_html('Help and Debugging'), 'manage_options','wpbot_help_page', 'wpbot_help_page_callback_func' );
173 }
174
175 function screen_option(){
176 $option = 'per_page';
177 $args = [
178 'label' => 'Response',
179 'default' => 5,
180 'option' => 'responses_per_page'
181 ];
182
183 add_screen_option( $option, $args );
184
185 $this->response_list = new Response_list();
186 }
187
188 public function qcld_wb_chatbot_admin_str(){
189
190 require_once("includes/simple_text_response.php");
191
192 }
193
194 /**
195 * Include admin scripts
196 */
197 public function qcld_wb_chatbot_admin_scripts($hook)
198 {
199 global $wpcommerce, $wp_scripts;
200 $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
201 if (((!empty($_GET["page"])) && ($_GET["page"] == "wpbot")) || ($hook == "widgets.php") || $_GET['page']=='wpbot_help_page' || $_GET['page']=='wpbot-panel' || $_GET["page"] == "wbcs-botsessions-page" ) {
202
203 wp_enqueue_script('jquery');
204 //wp_enqueue_style('wpcommerce_admin_styles', $wpcommerce->plugin_url() . '/assets/css/admin.css');
205 wp_register_style('qlcd-wp-chatbot-admin-style', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/admin-style.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
206 wp_enqueue_style('qlcd-wp-chatbot-admin-style');
207 wp_register_style('qlcd-wp-chatbot-font-awesome', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/font-awesome.min.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
208 wp_enqueue_style('qlcd-wp-chatbot-font-awesome');
209 wp_register_style('qlcd-wp-chatbot-tabs-style', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/wp-chatbot-tabs.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
210 wp_enqueue_style('qlcd-wp-chatbot-tabs-style');
211 wp_register_style('jquery.fontpicker.min.css', QCLD_wpCHATBOT_PLUGIN_URL . 'css/fontpicker.min.css', '', QCLD_wpCHATBOT_VERSION, 'screen');
212 wp_enqueue_style('jquery.fontpicker.min.css');
213 wp_enqueue_script('jquery');
214 wp_enqueue_script( 'jquery-ui-draggable' );
215 wp_enqueue_script( 'jquery-ui-droppable' );
216 wp_enqueue_script('jquery-ui-core');
217 wp_enqueue_style( 'wp-color-picker');
218 wp_enqueue_script( 'wp-color-picker');
219 wp_enqueue_script( 'jquery-ui-sortable');
220 wp_register_script('qcld-wp-fontpicker', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/fontpicker.js', basename(__FILE__)), array(), true);
221 wp_enqueue_script('qcld-wp-fontpicker');
222 wp_register_script('qcld-wp-chatbot-cbpFWTabs', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/cbpFWTabs.js', basename(__FILE__)), array(), true);
223 wp_enqueue_script('qcld-wp-chatbot-cbpFWTabs');
224 wp_register_script('qcld-wp-chatbot-modernizr-custom', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/modernizr.custom.js', basename(__FILE__)), array(), true);
225 wp_enqueue_script('qcld-wp-chatbot-modernizr-custom');
226 wp_register_script('qcld-wp-chatbot-bootstrap-js', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/bootstrap.js', basename(__FILE__)), array('jquery'), true);
227 wp_enqueue_script('qcld-wp-chatbot-bootstrap-js');
228 wp_register_style('qcld-wp-chatbot-bootstrap-css', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/bootstrap.min.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
229 wp_enqueue_style('qcld-wp-chatbot-bootstrap-css');
230 //jquery time picker
231 wp_register_script('qcld-wp-chatbot-timepicker-js', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/jquery.timepicker.js', basename(__FILE__)), array('jquery'), true);
232 wp_enqueue_script('qcld-wp-chatbot-timepicker-js');
233 wp_register_style('qcld-wp-chatbot-timepicker-css', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/jquery.timepicker.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
234 wp_enqueue_style('qcld-wp-chatbot-timepicker-css');
235
236 wp_register_script('qcld-wp-chatbot-admin-js', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/qcld-wp-chatbot-admin.js', basename(__FILE__)), array('jquery', 'jquery-ui-core','jquery-ui-sortable','wp-color-picker','qcld-wp-chatbot-timepicker-js'), '10.9.9', true);
237
238 wp_enqueue_script('qcld-wp-chatbot-admin-js');
239 wp_localize_script('qcld-wp-chatbot-admin-js', 'ajax_object',
240 array('ajax_url' => admin_url('admin-ajax.php'),'image_path' => QCLD_wpCHATBOT_IMG_URL));
241 // WordPress Media library
242 wp_enqueue_media();
243 }
244 }
245 public function qc_get_formbuilder_forms(){
246 global $wpdb;
247 $forms = array();
248 if(class_exists('Qcformbuilder_Forms_Admin')){
249 $results = $wpdb->get_results("SELECT * FROM ". $wpdb->prefix."wfb_forms where 1 and type='primary'");
250 if(!empty($results)){
251 foreach($results as $result){
252 $form = maybe_unserialize($result->config);
253 $forms[] = trim($form['name']);
254 }
255 return $forms;
256 }else{
257 return array();
258 }
259 }else{
260 return array();
261 }
262 }
263 function qc_wpbot_simple_response_intent(){
264 global $wpdb;
265 $table = $wpdb->prefix.'wpbot_response';
266 $results = $wpdb->get_results("SELECT `intent` FROM `$table` WHERE 1 and `intent` !=''");
267 $response = array();
268 if(!empty($results)){
269 foreach($results as $result){
270 $response[] = $result->intent;
271 }
272 }
273 return $response;
274 }
275 function qc_get_formbuilder_form_commands(){
276 global $wpdb;
277 $command = array();
278 if(class_exists('Qcformbuilder_Forms_Admin')){
279 $results = $wpdb->get_results("SELECT * FROM ". $wpdb->prefix."wfb_forms where 1 and type='primary'");
280 if(!empty($results)){
281 foreach($results as $result){
282 $form = maybe_unserialize($result->config);
283
284 if(isset($form['command'])){
285 $command[] = array_map('trim', explode(',', strtolower($form['command'])));
286 }
287
288 }
289 return $command;
290 }else{
291 return array();
292 }
293 }else{
294 return array();
295 }
296 }
297
298 public function qc_get_formbuilder_form_ids(){
299 global $wpdb;
300 $forms = array();
301 if(class_exists('Qcformbuilder_Forms_Admin')){
302 $results = $wpdb->get_results("SELECT * FROM ". $wpdb->prefix."wfb_forms where 1 and type='primary'");
303 if(!empty($results)){
304 foreach($results as $result){
305 $form = maybe_unserialize($result->config);
306 $forms[] = trim($form['ID']);
307 }
308 return $forms;
309 }else{
310 return array();
311 }
312 }else{
313 return array();
314 }
315 }
316
317 public function qcld_wb_chatbot_frontend_scripts()
318 {
319 global $wpcommerce, $wp_scripts, $wpdb, $current_user;
320
321 $display_name = '';
322 $display_email = '';
323 $user_image = get_option('wp_custom_client_icon');
324 $user_id = 0;
325 $user_image = get_option('wp_custom_client_icon');
326 if ( is_user_logged_in() ) {
327 $display_name = $current_user->display_name;
328 $display_email = $current_user->user_email;
329 $user_image = esc_url( get_avatar_url( $current_user->ID ) );
330 $user_id = $current_user->ID;
331 }
332
333 $conversation_form_ids = array();
334 $conversation_form_names = array();
335
336 if(class_exists('Qcformbuilder_Forms_Admin')){
337 $results = $wpdb->get_results("SELECT * FROM ". $wpdb->prefix."wfb_forms where 1 and type='primary'");
338 if(!empty($results)){
339
340 foreach($results as $result){
341 $form = unserialize($result->config);
342 $conversation_form_ids[] = $form['ID'];
343 $conversation_form_names[] = $form['name'];
344 }
345
346 }
347 }
348
349 $wp_chatbot_obj = array(
350 'wp_chatbot_position_x' => get_option('wp_chatbot_position_x'),
351 'wp_chatbot_position_y' => get_option('wp_chatbot_position_y'),
352 'disable_icon_animation' => get_option('disable_wp_chatbot_icon_animation'),
353 'disable_featured_product' => get_option('disable_wp_chatbot_featured_product'),
354 'disable_product_search' => get_option('disable_wp_chatbot_product_search'),
355 'disable_catalog' => get_option('disable_wp_chatbot_catalog'),
356 'disable_order_status' => get_option('disable_wp_chatbot_order_status'),
357 'disable_sale_product' => get_option('disable_wp_chatbot_sale_product'),
358 'open_product_detail' => get_option('wp_chatbot_open_product_detail'),
359 'order_user' => get_option('qlcd_wp_chatbot_order_user'),
360 'ajax_url' => admin_url('admin-ajax.php'),
361 'image_path' => QCLD_wpCHATBOT_IMG_URL,
362 'yes' => str_replace('\\', '',get_option('qlcd_wp_chatbot_yes')),
363 'no' => str_replace('\\', '',get_option('qlcd_wp_chatbot_no')),
364 'or' => str_replace('\\', '',get_option('qlcd_wp_chatbot_or')),
365 'host' => str_replace('\\', '',get_option('qlcd_wp_chatbot_host')),
366 'agent' => str_replace('\\', '',get_option('qlcd_wp_chatbot_agent')),
367 'agent_image' => get_option('wp_chatbot_agent_image'),
368 'agent_image_path' => $this->qcld_wb_chatbot_agent_icon(),
369 'shopper_demo_name' => str_replace('\\', '',get_option('qlcd_wp_chatbot_shopper_demo_name')),
370 'agent_join' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_agent_join'))),
371 'welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_welcome'))),
372 'welcome_back' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_welcome_back'))),
373 'hi_there' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_hi_there'))),
374 'asking_name' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_name'))),
375 'i_am' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_i_am'))),
376 'name_greeting' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_name_greeting'))),
377 'wildcard_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_msg'))),
378 'empty_filter_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_empty_filter_msg'))),
379 'did_you_mean' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_did_you_mean'))),
380 'is_typing' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_is_typing'))),
381 'send_a_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_send_a_msg'))),
382 'viewed_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_viewed_products'))),
383 'shopping_cart' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_shopping_cart'))),
384 'cart_updating' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_cart_updating'))),
385 'cart_removing' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_cart_removing'))),
386 'imgurl' => QCLD_wpCHATBOT_IMG_URL,
387 'sys_key_help' => get_option('qlcd_wp_chatbot_sys_key_help'),
388 'sys_key_product' => get_option('qlcd_wp_chatbot_sys_key_product'),
389 'sys_key_catalog' => get_option('qlcd_wp_chatbot_sys_key_catalog'),
390 'sys_key_order' => get_option('qlcd_wp_chatbot_sys_key_order'),
391 'sys_key_support' => get_option('qlcd_wp_chatbot_sys_key_support'),
392 'sys_key_reset' => get_option('qlcd_wp_chatbot_sys_key_reset'),
393 'help_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_help_welcome'))),
394 'back_to_start' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_back_to_start'))),
395 'help_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_help_msg'))),
396 'reset' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_reset'))),
397 'wildcard_product' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_product'))),
398 'wildcard_catalog' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_catalog'))),
399 'featured_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_featured_products'))),
400 'sale_products' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_sale_products'))),
401 'wildcard_order' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_wildcard_order'))),
402 'wildcard_support' => get_option('qlcd_wp_chatbot_wildcard_support'),
403 'product_asking' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_asking'))),
404 'product_suggest' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_suggest'))),
405 'product_infinite' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_infinite'))),
406 'product_success' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_success'))),
407 'product_fail' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_product_fail'))),
408 'support_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_support_welcome'))),
409 'support_email' => get_option('qlcd_wp_chatbot_support_email'),
410 'support_option_again' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_support_option_again'))),
411 'asking_email' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_email'))),
412 'asking_msg' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_msg'))),
413 'no_result' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_no_result'))),
414 'support_phone' => get_option('qlcd_wp_chatbot_support_phone'),
415 'asking_phone' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_asking_phone'))),
416 'thank_for_phone' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_thank_for_phone'))),
417 'support_query' =>$this->qcld_wb_chatbot_str_replace(unserialize( get_option('support_query'))),
418 'support_ans' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('support_ans'))),
419 'notification_interval' => get_option('qlcd_wp_chatbot_notification_interval'),
420 'notifications' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_notifications'))),
421 'order_welcome' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_welcome'))),
422 'order_username_asking' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_username_asking'))),
423 'order_username_password' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_username_password'))),
424 'order_user' => get_option('qlcd_wp_chatbot_order_user'),
425 'order_login' => is_user_logged_in(),
426 'is_chat_session_active' => (get_option('enable_chat_session')!=''?get_option('enable_chat_session'):0),
427 'order_nonce' => wp_create_nonce("wpwbot-order-nonce"),
428 'order_email_support' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_order_email_support'))),
429 'email_fail' => str_replace('\\', '', get_option('qlcd_wp_chatbot_email_fail')),
430 'invalid_email' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_invalid_email'))),
431 'stop_words' => str_replace('\\', '', get_option('qlcd_wp_chatbot_stop_words')),
432 'currency_symbol' => '',
433 'enable_messenger' => get_option('enable_wp_chatbot_messenger'),
434 'messenger_label' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_messenger_label'))),
435 'fb_page_id' => get_option('qlcd_wp_chatbot_fb_page_id'),
436 'enable_skype' => get_option('enable_wp_chatbot_skype'),
437 'enable_whats' => get_option('enable_wp_chatbot_whats'),
438 'whats_label' => $this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_whats_label'))),
439 'whats_num' => get_option('qlcd_wp_chatbot_whats_num'),
440 'ret_greet' => get_option('qlcd_wp_chatbot_ret_greet'),
441 'enable_exit_intent' => get_option('enable_wp_chatbot_exit_intent'),
442 'exit_intent_msg' => str_replace('\\', '', get_option('wp_chatbot_exit_intent_msg')),
443 'exit_intent_once' => get_option('wp_chatbot_exit_intent_once'),
444 'enable_scroll_open' => get_option('enable_wp_chatbot_scroll_open'),
445 'scroll_open_msg' => str_replace('\\', '', get_option('wp_chatbot_scroll_open_msg')),
446 'scroll_open_percent' => get_option('wp_chatbot_scroll_percent'),
447 'scroll_open_once' => get_option('wp_chatbot_scroll_once'),
448 'enable_auto_open' => get_option('enable_wp_chatbot_auto_open'),
449 'auto_open_msg' => str_replace('\\', '', get_option('wp_chatbot_auto_open_msg')),
450 'auto_open_time' => get_option('wp_chatbot_auto_open_time'),
451 'auto_open_once' => get_option('wp_chatbot_auto_open_once'),
452 'proactive_bg_color' => get_option('wp_chatbot_proactive_bg_color'),
453 'disable_feedback' => get_option('disable_wp_chatbot_feedback'),
454 'disable_faq' => get_option('disable_wp_chatbot_faq'),
455 'feedback_label' =>$this->qcld_wb_chatbot_str_replace(unserialize(get_option('qlcd_wp_chatbot_feedback_label'))),
456 'enable_meta_title' =>get_option('enable_wp_chatbot_meta_title'),
457 'meta_label' =>str_replace('\\', '', get_option('qlcd_wp_chatbot_meta_label')),
458 'phone_number' => get_option('qlcd_wp_chatbot_phone'),
459 'disable_site_search' => get_option('disable_wp_chatbot_site_search'),
460 'ajax_nonce'=> wp_create_nonce('qcsecretbotnonceval123qc'),
461 'site_search' => get_option('qlcd_wp_site_search'),
462 'call_gen' => get_option('disable_wp_chatbot_call_gen'),
463 'call_sup' => get_option('disable_wp_chatbot_call_sup'),
464 'enable_ret_sound' => get_option('enable_wp_chatbot_ret_sound'),
465 'enable_ret_user_show' => get_option('enable_wp_chatbot_ret_user_show'),
466 'enable_inactive_time_show' => get_option('enable_wp_chatbot_inactive_time_show'),
467 'ret_inactive_user_once' => get_option('wp_chatbot_inactive_once'),
468 'mobile_full_screen' => get_option('enable_wp_chatbot_mobile_full_screen'),
469 'botpreloadingtime' => (get_option('wpbot_preloading_time')?get_option('wpbot_preloading_time'):100),
470 'inactive_time' => get_option('wp_chatbot_inactive_time'),
471 'checkout_msg' => str_replace('\\', '', get_option('wp_chatbot_checkout_msg')),
472 'ai_df_enable' => get_option('enable_wp_chatbot_dailogflow'),
473 'ai_df_token' => get_option('qlcd_wp_chatbot_dialogflow_client_token'),
474 'df_defualt_reply' => str_replace('\\', '', get_option('qlcd_wp_chatbot_dialogflow_defualt_reply')),
475 'df_agent_lan' => get_option('qlcd_wp_chatbot_dialogflow_agent_language'),
476 'start_menu' => wp_unslash(get_option('qc_wpbot_menu_order')),
477 'conversation_form_ids' => $conversation_form_ids,
478 'conversation_form_names' => $conversation_form_names,
479 'simple_response_intent' => $this->qc_wpbot_simple_response_intent(),
480 'forms' => $this->qc_get_formbuilder_forms(),
481 'form_ids' =>$this->qc_get_formbuilder_form_ids(),
482 'form_commands' => $this->qc_get_formbuilder_form_commands(),
483 'df_api_version' => (get_option('wp_chatbot_df_api')==''?'v1':get_option('wp_chatbot_df_api')),
484 'v2_client_url'=> esc_url(get_site_url().'/?action=qcld_dfv2_api'),
485 'show_menu_after_greetings'=> (get_option('show_menu_after_greetings')!=''?get_option('show_menu_after_greetings'):0),
486 'current_user_id' => $user_id,
487
488 );
489 $user_font = get_option('wp_chat_user_font_family') != '' ? get_option('wp_chat_user_font_family') : '';
490 if($user_font != '' ){
491 $user_font_family = str_replace('\\', '',$user_font);
492 $user_font_family = json_decode($user_font_family);
493 $user_font_name = $user_font_family->fontFamily;
494 $user_font_name = str_replace(' ', '+', $user_font_name);
495 $user_font_name = str_replace("'","",$user_font_name );
496 $user_enqueue_font = 'https://fonts.googleapis.com/css2?family='.$user_font_name;
497 wp_enqueue_style( 'qcld-chatbot-user-google-fonts', $user_enqueue_font, false );
498 wp_enqueue_style( 'qcld-chatbot-user-google-fonts');
499 }
500
501 $bot_font = get_option('wp_chat_bot_font_family') != '' ? get_option('wp_chat_bot_font_family') : '';
502 if($bot_font != '' ){
503 $bot_font_family = str_replace('\\', '',$bot_font);
504 $bot_font_family = json_decode($bot_font_family);
505 $bot_font_name =$bot_font_family->fontFamily;
506 $bot_font_name = str_replace(' ', '+', $bot_font_name );
507 $bot_font_name = str_replace("'","",$bot_font_name );
508 $bot_enqueue_font = 'https://fonts.googleapis.com/css2?family='.$bot_font_name;
509 wp_enqueue_style( 'qcld-chatbot-bot-google-fonts', $bot_enqueue_font, false );
510 wp_enqueue_style( 'qcld-chatbot-bot-google-fonts');
511 }
512
513 wp_enqueue_style( 'dashicons' );
514 wp_register_script('qcld-wp-chatbot-slimscroll-js', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/jquery.slimscroll.min.js', basename(__FILE__)), array('jquery'), QCLD_wpCHATBOT_VERSION, true);
515 wp_enqueue_script('qcld-wp-chatbot-slimscroll-js');
516 wp_register_script('qcld-wp-chatbot-jquery-cookie', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/jquery.cookie.js', basename(__FILE__)), array('jquery'), QCLD_wpCHATBOT_VERSION, true);
517 wp_enqueue_script('qcld-wp-chatbot-jquery-cookie');
518 wp_register_script('qcld-wp-chatbot-magnify-popup', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/jquery.magnific-popup.min.js', basename(__FILE__)), array('jquery'), QCLD_wpCHATBOT_VERSION, true);
519 wp_enqueue_script('qcld-wp-chatbot-magnify-popup');
520 wp_register_script('qcld-wp-chatbot-plugin', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/qcld-wp-chatbot-plugin.js', basename(__FILE__)), array('jquery', 'qcld-wp-chatbot-jquery-cookie','qcld-wp-chatbot-magnify-popup'), QCLD_wpCHATBOT_VERSION, true);
521 wp_enqueue_script('qcld-wp-chatbot-plugin');
522 wp_register_script('qcld-wp-chatbot-front-js', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/qcld-wp-chatbot-front.js', basename(__FILE__)), array('jquery', 'qcld-wp-chatbot-jquery-cookie'), QCLD_wpCHATBOT_VERSION, true);
523 wp_enqueue_script('qcld-wp-chatbot-front-js');
524 wp_localize_script('qcld-wp-chatbot-front-js', 'wp_chatbot_obj', $wp_chatbot_obj);
525 //wp_register_script('qcld-wp-chatbot-frontend', plugins_url(basename(plugin_dir_path(__FILE__)) . '/js/qcld-wp-chatbot-frontend.js', basename(__FILE__)), array('jquery','qcld-wp-chatbot-jquery-cookie'), QCLD_wpCHATBOT_VERSION, true);
526 //wp_enqueue_script('qcld-wp-chatbot-frontend');
527 //wp_localize_script('qcld-wp-chatbot-frontend', 'wp_chatbot_obj', $wp_chatbot_obj);
528 wp_localize_script('qcld-wp-chatbot-frontend', 'wp_chatbot_obj', $wp_chatbot_obj);
529 wp_register_style('qcld-wp-chatbot-common-style', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/common-style.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
530 wp_enqueue_style('qcld-wp-chatbot-common-style');
531
532 if(get_option('wp_chatbot_floatingiconbg_color')!="") {
533 $custom_colors = ".wp-chatbot-ball{
534 background: ". get_option('wp_chatbot_floatingiconbg_color')." !important;
535 }
536 .wp-chatbot-ball:hover, .wp-chatbot-ball:focus{
537 background: ".get_option('wp_chatbot_floatingiconbg_color')." !important;
538 }";
539 wp_add_inline_style( 'qcld-wp-chatbot-common-style', $custom_colors );
540 }
541
542
543 wp_register_style('qcld-wp-chatbot-magnific-popup', plugins_url(basename(plugin_dir_path(__FILE__)) . '/css/magnific-popup.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
544 wp_enqueue_style('qcld-wp-chatbot-magnific-popup');
545 $qcld_wb_chatbot_theme = get_option('qcld_wb_chatbot_theme');
546 /* if (file_exists(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/templates/' . $qcld_wb_chatbot_theme . '/style.css')) {
547 wp_register_style('qcld-wp-chatbot-style', plugins_url(basename(plugin_dir_path(__FILE__)) . '/templates/' . $qcld_wb_chatbot_theme . '/style.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
548 wp_enqueue_style('qcld-wp-chatbot-style');
549 }*/
550 //Loading shortcode style
551 if (file_exists(QCLD_wpCHATBOT_PLUGIN_DIR_PATH . '/templates/' . $qcld_wb_chatbot_theme . '/shortcode.css')) {
552 wp_register_style('qcld-wp-chatbot-shortcode-style', plugins_url(basename(plugin_dir_path(__FILE__)) . '/templates/' . $qcld_wb_chatbot_theme . '/shortcode.css', basename(__FILE__)), '', QCLD_wpCHATBOT_VERSION, 'screen');
553 wp_enqueue_style('qcld-wp-chatbot-shortcode-style');
554 }
555 $custom_colors = '';
556 if(get_option('enable_wp_chatbot_custom_color')==1){
557 $custom_colors .="
558 #wp-chatbot-chat-container, .wp-chatbot-product-description, .wp-chatbot-product-description p,.wp-chatbot-product-quantity label, .wp-chatbot-product-variable label {
559 color: ". get_option('wp_chatbot_text_color')." !important;
560 }
561 #wp-chatbot-chat-container a {
562 color: ". get_option('wp_chatbot_link_color')." !important;
563 }
564 #wp-chatbot-chat-container a:hover {
565 color: ". get_option('wp_chatbot_link_hover_color')." !important;
566 }
567
568 ul.wp-chatbot-messages-container > li.wp-chatbot-msg .wp-chatbot-paragraph,
569 .wp-chatbot-agent-profile .wp-chatbot-bubble {
570 color: ". get_option('wp_chatbot_bot_msg_text_color')." !important;
571 background-color: ". get_option('wp_chatbot_bot_msg_bg_color')." !important;
572 word-break: break-word;
573 }
574 span.qcld-chatbot-product-category, span.qcld-chatbot-support-items, span.qcld-chatbot-wildcard, span.qcld-chatbot-suggest-email, span.qcld-chatbot-reset-btn, #woo-chatbot-loadmore, .wp-chatbot-shortcode-template-container span.qcld-chatbot-product-category, .wp-chatbot-shortcode-template-container span.qcld-chatbot-support-items, .wp-chatbot-shortcode-template-container span.qcld-chatbot-wildcard, .wp-chatbot-shortcode-template-container span.wp-chatbot-card-button, .wp-chatbot-shortcode-template-container span.qcld-chatbot-suggest-email, span.qcld-chatbot-suggest-phone, .wp-chatbot-shortcode-template-container span.qcld-chatbot-reset-btn, .wp-chatbot-shortcode-template-container #wp-chatbot-loadmore, .wp-chatbot-ball-cart-items, .wpbd_subscription, .qcld-chatbot-site-search, .qcld_subscribe_confirm, .qcld-chat-common, .qcld-chatbot-custom-intent {
575 color: ". get_option('wp_chatbot_buttons_text_color') ." !important;
576 background-color: ". get_option('wp_chatbot_buttons_bg_color') ." !important;
577 background-image: none !important;
578 }
579
580 span.qcld-chatbot-product-category:hover, span.qcld-chatbot-support-items:hover, span.qcld-chatbot-wildcard:hover, span.qcld-chatbot-suggest-email:hover, span.qcld-chatbot-reset-btn:hover, #woo-chatbot-loadmore:hover, .wp-chatbot-shortcode-template-container:hover span.qcld-chatbot-product-category:hover, .wp-chatbot-shortcode-template-container:hover span.qcld-chatbot-support-items:hover, .wp-chatbot-shortcode-template-container:hover span.qcld-chatbot-wildcard:hover, .wp-chatbot-shortcode-template-container:hover span.wp-chatbot-card-button:hover, .wp-chatbot-shortcode-template-container:hover span.qcld-chatbot-suggest-email:hover, span.qcld-chatbot-suggest-phone:hover, .wp-chatbot-shortcode-template-container:hover span.qcld-chatbot-reset-btn:hover, .wp-chatbot-shortcode-template-container:hover #wp-chatbot-loadmore:hover, .wp-chatbot-ball-cart-items:hover, .wpbd_subscription:hover, .qcld-chatbot-site-search:hover, .qcld_subscribe_confirm:hover, .qcld-chat-common:hover, .qcld-chatbot-custom-intent:hover {
581 color: ". get_option('wp_chatbot_buttons_text_color_hover') ." !important;
582 background-color: ". get_option('wp_chatbot_buttons_bg_color_hover') ." !important;
583 background-image: none !important;
584 }
585
586 li.wp-chat-user-msg .wp-chatbot-paragraph {
587 color: ". get_option('wp_chatbot_user_msg_text_color')." !important;
588 background-color: ". get_option('wp_chatbot_user_msg_bg_color')." !important;
589 }
590 ul.wp-chatbot-messages-container > li.wp-chatbot-msg > .wp-chatbot-paragraph:before,
591 .wp-chatbot-bubble:before {
592 border-right: 10px solid ". get_option('wp_chatbot_bot_msg_bg_color')." !important;
593
594 }
595 ul.wp-chatbot-messages-container > li.wp-chat-user-msg > .wp-chatbot-paragraph:before {
596 border-left: 10px solid ". get_option('wp_chatbot_user_msg_bg_color')." !important;
597 }
598 #wp-chatbot-chat-container .wp-chatbot-header{
599 background: ". get_option('wp_chatbot_header_background_color')." !important;
600 }
601 ";
602
603 }
604 if((get_option('enable_wp_chatbot_custom_color')==1) && $user_font != ''){
605 $custom_colors .="
606 #wp-chatbot-messages-container > li.wp-chatbot-msg > .wp-chatbot-paragraph,
607 #wp-chatbot-messages-container > li.wp-chatbot-msg > span{
608 font-family: ".$bot_font_family->fontFamily.";
609 font-weight: ".$bot_font_family->fontWeight.";
610 font-style: ".$bot_font_family->fontStyle.";
611 font-size: ". get_option('wp_chatbot_font_size'). ";
612 }
613 ";
614 }
615 if((get_option('enable_wp_chatbot_custom_color')==1) && $bot_font != ''){
616 $custom_colors .="
617 #wp-chatbot-messages-container > li.wp-chat-user-msg > .wp-chatbot-paragraph{
618 font-family: ".$user_font_family->fontFamily.";
619 font-weight: ".$user_font_family->fontWeight.";
620 font-style: ".$user_font_family->fontStyle.";
621 font-size: ". get_option('wp_chatbot_font_size'). ";
622 }
623 ";
624 }
625 wp_add_inline_style( 'qcld-wp-chatbot-common-style', $custom_colors );
626 if(get_option('wp_chatbot_custom_css')!=""){
627
628 wp_add_inline_style( 'qlcd-wp-chatbot-admin-style', get_option('wp_chatbot_custom_css') );
629 }
630 }
631 public function qcld_wb_chatbot_str_replace($messages=array()){
632 $refined_mesgses=array();
633 if(!empty($messages)){
634 foreach ($messages as $message){
635 $refined_msg=str_replace('\\', '', $message);
636 array_push($refined_mesgses,$refined_msg);
637 }
638 }
639 return $refined_mesgses;
640 }
641 //getting exact agent icon path
642 public function qcld_wb_chatbot_agent_icon(){
643
644 if(get_option('wp_chatbot_custom_agent_path')!="" && get_option('wp_chatbot_agent_image')=="custom-agent.png" ){
645 $wp_chatbot_custom_icon_path=get_option('wp_chatbot_custom_agent_path');
646 }
647 else if(get_option('wp_chatbot_custom_agent_path')!="" && get_option('wp_chatbot_agent_image')!="custom-agent.png"){
648 $wp_chatbot_custom_icon_path=QCLD_wpCHATBOT_IMG_URL.get_option('wp_chatbot_agent_image');
649 }
650 else
651 {
652 if(get_option('wp_chatbot_agent_image')!=''){
653 $wp_chatbot_custom_icon_path=QCLD_wpCHATBOT_IMG_URL.get_option('wp_chatbot_agent_image');
654 }else{
655 $wp_chatbot_custom_icon_path=QCLD_wpCHATBOT_IMG_URL.'custom-agent.png';
656 }
657
658 }
659
660 return $wp_chatbot_custom_icon_path;
661 }
662 /**
663 * Render the admin page
664 */
665
666 public function qcld_wb_chatbot_admin_page()
667 {
668 global $wpcommerce;
669 $action = 'admin.php?page=wpbot-panel';
670 require_once("admin_ui2.php");
671 }
672
673 public function qcld_wb_chatbot_admin_page_settings()
674 {
675 global $wpcommerce;
676 $action = 'admin.php?page=wpbot';
677 require_once("admin_ui.php");
678 }
679
680 public function qcld_wb_chatbot_dynamic_multi_option($options = array(), $option_name = "", $option_text = "")
681 {
682 ?>
683
684 <h4 class="qc-opt-title">
685 <?php esc_html_e($option_text, 'wpchatbot'); ?>
686 </h4>
687 <div class="wp-chatbot-lng-items">
688 <?php
689 if (is_array($options) && count($options) > 0) {
690 foreach ($options as $key => $value) {
691 ?>
692 <div class="row" class="wp-chatbot-lng-item">
693 <div class="col-xs-10">
694 <input type="text"
695 class="form-control qc-opt-dcs-font"
696 name="<?php echo $option_name; ?>[]"
697 value="<?php echo str_replace('\\', '', $value); ?>">
698 </div>
699 <div class="col-xs-2">
700 <button type="button" class="btn btn-danger btn-sm wp-chatbot-lng-item-remove"> <span class="glyphicon glyphicon-remove"></span> </button>
701 </div>
702 </div>
703 <?php
704 }
705 } else { ?>
706 <div class="row" class="wp-chatbot-lng-item">
707 <div class="col-xs-10">
708 <input type="text"
709 class="form-control qc-opt-dcs-font"
710 name="<?php echo $option_name; ?>[]"
711 value="<?php echo $option_text; ?>">
712 </div>
713 <div class="col-xs-2"> <span class="wp-chatbot-lng-item-remove">
714 <?php esc_html_e('X', 'wpchatbot'); ?>
715 </span> </div>
716 </div>
717 <?php } ?>
718 </div>
719 <div class="row">
720 <div class="col-sm-2 col-sm-offset-10">
721 <button type="button" class="btn btn-success btn-sm wp-chatbot-lng-item-add"> <span class="glyphicon glyphicon-plus"></span> </button>
722 </div>
723 </div>
724 <?php
725 }
726
727 function qcld_wb_chatbot_save_options()
728 {
729 //global $wpcommerce;
730 if (isset($_POST['_wpnonce']) && $_POST['_wpnonce']) {
731 wp_verify_nonce($_POST['_wpnonce'], 'wp_chatbot');
732 // Check if the form is submitted or not
733 if (isset($_POST['submit'])) {
734 //wpwboticon position settings.
735 if (isset($_POST["wp_chatbot_position_x"])) {
736 $wp_chatbot_position_x = intval(($_POST["wp_chatbot_position_x"]));
737 update_option('wp_chatbot_position_x', $wp_chatbot_position_x);
738 }
739 if (isset($_POST["wp_chatbot_position_y"])) {
740 $wp_chatbot_position_y = intval(($_POST["wp_chatbot_position_y"]));
741 update_option('wp_chatbot_position_y', $wp_chatbot_position_y);
742 }
743 //product search options
744 if(isset($_POST['qlcd_wp_chatbot_search_option'])){
745 $qlcd_wp_chatbot_search_option = sanitize_text_field($_POST['qlcd_wp_chatbot_search_option']);
746 update_option('qlcd_wp_chatbot_search_option', $qlcd_wp_chatbot_search_option);
747 }
748
749 //Enable /disable wpwbot
750 if(isset( $_POST["disable_wp_chatbot"])){
751 $disable_wp_chatbot = sanitize_text_field($_POST["disable_wp_chatbot"]);
752 }else{ $disable_wp_chatbot='';}
753 update_option('disable_wp_chatbot', wp_unslash($disable_wp_chatbot));
754
755 if(isset( $_POST["qlcd_wp_chatbot_admin_email"])){
756 $qlcd_wp_chatbot_admin_email = sanitize_email($_POST["qlcd_wp_chatbot_admin_email"]);
757 }else{ $qlcd_wp_chatbot_admin_email='';}
758 update_option('qlcd_wp_chatbot_admin_email', wp_unslash($qlcd_wp_chatbot_admin_email));
759
760
761 if(isset( $_POST["qlcd_wp_chatbot_from_email"])){
762 $qlcd_wp_chatbot_from_email = sanitize_email($_POST["qlcd_wp_chatbot_from_email"]);
763 }else{ $qlcd_wp_chatbot_from_email='';}
764 update_option('qlcd_wp_chatbot_from_email', wp_unslash($qlcd_wp_chatbot_from_email));
765
766 if(isset( $_POST["disable_wp_chatbot_on_mobile"])) {
767 $disable_wp_chatbot_on_mobile = sanitize_text_field($_POST["disable_wp_chatbot_on_mobile"]);
768 }else{ $disable_wp_chatbot_on_mobile='';}
769 update_option('disable_wp_chatbot_on_mobile', wp_unslash($disable_wp_chatbot_on_mobile));
770 if(isset( $_POST["disable_wp_chatbot_product_search"])) {
771 $disable_wp_chatbot_product_search = sanitize_text_field($_POST["disable_wp_chatbot_product_search"]);
772 }else{ $disable_wp_chatbot_product_search='';}
773 update_option('disable_wp_chatbot_product_search', wp_unslash($disable_wp_chatbot_product_search));
774 if(isset( $_POST["disable_wp_chatbot_catalog"])) {
775 $disable_wp_chatbot_catalog= sanitize_text_field($_POST["disable_wp_chatbot_catalog"]);
776 }else{ $disable_wp_chatbot_catalog='';}
777 update_option('disable_wp_chatbot_catalog', wp_unslash($disable_wp_chatbot_catalog));
778 if(isset( $_POST["disable_wp_chatbot_order_status"])) {
779 $disable_wp_chatbot_order_status = sanitize_text_field($_POST["disable_wp_chatbot_order_status"]);
780 }else{ $disable_wp_chatbot_order_status='';}
781 update_option('disable_wp_chatbot_order_status', wp_unslash($disable_wp_chatbot_order_status));
782 if(isset( $_POST["disable_wp_chatbot_notification"])) {
783 $disable_wp_chatbot_notification = sanitize_text_field($_POST["disable_wp_chatbot_notification"]);
784 }else{ $disable_wp_chatbot_notification='1';}
785 update_option('disable_wp_chatbot_notification', wp_unslash($disable_wp_chatbot_notification));
786
787 if(isset( $_POST["enable_wp_chatbot_rtl"])) {
788 $enable_wp_chatbot_rtl = sanitize_text_field($_POST["enable_wp_chatbot_rtl"]);
789 }else{ $enable_wp_chatbot_rtl='';}
790 update_option('enable_wp_chatbot_rtl', wp_unslash($enable_wp_chatbot_rtl));
791
792 if(isset( $_POST["show_menu_after_greetings"])) {
793 $show_menu_after_greetings = sanitize_text_field($_POST["show_menu_after_greetings"]);
794 }else{ $show_menu_after_greetings='';}
795 update_option('show_menu_after_greetings', wp_unslash($show_menu_after_greetings));
796 if(isset( $_POST["enable_chat_session"])) {
797 $enable_chat_session = sanitize_text_field($_POST["enable_chat_session"]);
798 }else{ $enable_chat_session='';}
799 update_option('enable_chat_session', wp_unslash($enable_chat_session));
800
801
802 if(isset( $_POST["enable_wp_chatbot_mobile_full_screen"])) {
803 $enable_wp_chatbot_mobile_full_screen = sanitize_text_field($_POST["enable_wp_chatbot_mobile_full_screen"]);
804 }else{ $enable_wp_chatbot_mobile_full_screen='';}
805 update_option('enable_wp_chatbot_mobile_full_screen', wp_unslash($enable_wp_chatbot_mobile_full_screen));
806
807 if(isset( $_POST["wpbot_preloading_time"])) {
808 $wpbot_preloading_time = sanitize_text_field($_POST["wpbot_preloading_time"]);
809 }else{ $wpbot_preloading_time='100';}
810 update_option('wpbot_preloading_time', wp_unslash($wpbot_preloading_time));
811
812 if(isset( $_POST["disable_wp_chatbot_icon_animation"])) {
813 $disable_wp_chatbot_icon_animation = sanitize_text_field($_POST["disable_wp_chatbot_icon_animation"]);
814 }else{ $disable_wp_chatbot_icon_animation='';}
815 update_option('disable_wp_chatbot_icon_animation', wp_unslash($disable_wp_chatbot_icon_animation));
816 //Enable /disable Cart Item Number
817 if(isset( $_POST["disable_wp_chatbot_cart_item_number"])) {
818 $disable_wp_chatbot_cart_item_number = sanitize_text_field($_POST["disable_wp_chatbot_cart_item_number"]);
819 }else{ $disable_wp_chatbot_cart_item_number='';}
820 update_option('disable_wp_chatbot_cart_item_number', wp_unslash($disable_wp_chatbot_cart_item_number));
821 //Enable /disable featured products button.
822 if(isset( $_POST["disable_wp_chatbot_featured_product"])) {
823 $disable_wp_chatbot_featured_product = sanitize_text_field($_POST["disable_wp_chatbot_featured_product"]);
824 }else{ $disable_wp_chatbot_featured_product='';}
825 update_option('disable_wp_chatbot_featured_product', wp_unslash($disable_wp_chatbot_featured_product));
826 //Enable /disable sale products button
827 if(isset( $_POST["disable_wp_chatbot_sale_product"])) {
828 $disable_wp_chatbot_sale_product = sanitize_text_field($_POST["disable_wp_chatbot_sale_product"]);
829 }else{ $disable_wp_chatbot_sale_product='';}
830 update_option('disable_wp_chatbot_sale_product', wp_unslash($disable_wp_chatbot_sale_product));
831 //Enable Product details page.
832 if(isset( $_POST["wp_chatbot_open_product_detail"])) {
833 $wp_chatbot_open_product_detail = sanitize_text_field($_POST["wp_chatbot_open_product_detail"]);
834 }else{ $wp_chatbot_open_product_detail='';}
835 update_option('wp_chatbot_open_product_detail', wp_unslash($wp_chatbot_open_product_detail));
836 //product order and order by
837 if(isset($_POST['qlcd_wp_chatbot_product_orderby'])){
838 $qlcd_wp_chatbot_product_orderby = sanitize_text_field($_POST['qlcd_wp_chatbot_product_orderby']);
839 update_option('qlcd_wp_chatbot_product_orderby', sanitize_text_field($qlcd_wp_chatbot_product_orderby));
840 }
841 if(isset($_POST['qlcd_wp_chatbot_product_order'])){
842 $qlcd_wp_chatbot_product_order = sanitize_text_field($_POST['qlcd_wp_chatbot_product_order']);
843 update_option('qlcd_wp_chatbot_product_order', sanitize_text_field($qlcd_wp_chatbot_product_order));
844 }
845
846
847 //Product per page settings.
848 if (isset($_POST["qlcd_wp_chatbot_ppp"])) {
849 $qlcd_wp_chatbot_ppp = sanitize_text_field($_POST["qlcd_wp_chatbot_ppp"]);
850 update_option('qlcd_wp_chatbot_ppp', intval($qlcd_wp_chatbot_ppp));
851 }
852 if(isset( $_POST["wp_chatbot_exclude_stock_out_product"])) {
853 $wp_chatbot_exclude_stock_out_product = sanitize_text_field($_POST['wp_chatbot_exclude_stock_out_product']);
854 }else{ $wp_chatbot_exclude_stock_out_product='';}
855 update_option('wp_chatbot_exclude_stock_out_product', wp_unslash($wp_chatbot_exclude_stock_out_product));
856 if(isset( $_POST["wp_chatbot_show_parent_category"])) {
857 $wp_chatbot_show_parent_category = sanitize_text_field($_POST['wp_chatbot_show_parent_category']);
858 }else{ $wp_chatbot_show_parent_category='';}
859 update_option('wp_chatbot_show_parent_category', wp_unslash($wp_chatbot_show_parent_category));
860 if(isset( $_POST["wp_chatbot_show_sub_category"])) {
861 $wp_chatbot_show_sub_category = sanitize_text_field($_POST['wp_chatbot_show_sub_category']);
862 }else{ $wp_chatbot_show_sub_category='';}
863 update_option('wp_chatbot_show_sub_category', wp_unslash($wp_chatbot_show_sub_category));
864 if (isset($_POST["qlcd_wp_chatbot_order_user"])) {
865 $qlcd_wp_chatbot_order_user = sanitize_text_field($_POST["qlcd_wp_chatbot_order_user"]);
866 update_option('qlcd_wp_chatbot_order_user', sanitize_text_field($qlcd_wp_chatbot_order_user));
867 }
868
869 if(isset( $_POST["qc_wpbot_menu_order"]) && !empty($_POST["qc_wpbot_menu_order"])) {
870 $qc_wpbot_menu_order = wp_kses_post($_POST["qc_wpbot_menu_order"]);
871 }else{ $qc_wpbot_menu_order='';}
872 update_option('qc_wpbot_menu_order', ($qc_wpbot_menu_order));
873
874 //wpwBot Load control
875 if(isset($_POST["wp_chatbot_show_home_page"])){
876 $wp_chatbot_show_home_page = sanitize_key(($_POST["wp_chatbot_show_home_page"]));
877 update_option('wp_chatbot_show_home_page', $wp_chatbot_show_home_page);
878 }
879
880
881 if(isset($_POST["wp_chatbot_show_posts"])){
882 $wp_chatbot_show_posts = sanitize_key(($_POST["wp_chatbot_show_posts"]));
883 update_option('wp_chatbot_show_posts', $wp_chatbot_show_posts);
884 }
885
886
887 if(isset($_POST["wp_chatbot_show_pages"])){
888 $wp_chatbot_show_pages = sanitize_key(($_POST["wp_chatbot_show_pages"]));
889 update_option('wp_chatbot_show_pages', $wp_chatbot_show_pages);
890 }
891
892 if(isset( $_POST["wp_chatbot_show_pages_list"])) {
893 $wp_chatbot_show_pages_list = wp_parse_id_list($_POST["wp_chatbot_show_pages_list"]);
894 update_option('wp_chatbot_show_pages_list', serialize($wp_chatbot_show_pages_list));
895 }else{
896 $wp_chatbot_show_pages_list='';
897 update_option('wp_chatbot_show_pages_list', serialize($wp_chatbot_show_pages_list));
898 }
899 if(isset( $_POST["wp_chatbot_exclude_post_list"])) {
900 $wp_chatbot_exclude_post_list = $_POST["wp_chatbot_exclude_post_list"];
901 }else{ $wp_chatbot_exclude_post_list='';}
902 update_option('wp_chatbot_exclude_post_list', serialize($wp_chatbot_exclude_post_list));
903
904 if(isset($_POST["wp_chatbot_show_wpcommerce"])){
905 $wp_chatbot_show_wpcommerce = sanitize_key(($_POST["wp_chatbot_show_wpcommerce"]));
906 update_option('wp_chatbot_show_wpcommerce', $wp_chatbot_show_wpcommerce);
907 }
908
909
910 //Stop Words Settings
911 if (isset($_POST["qlcd_wp_chatbot_stop_words_name"])) {
912 $qlcd_wp_chatbot_stop_words_name = sanitize_text_field($_POST["qlcd_wp_chatbot_stop_words_name"]);
913 update_option('qlcd_wp_chatbot_stop_words_name', $qlcd_wp_chatbot_stop_words_name);
914 }
915 if (isset($_POST["qlcd_wp_chatbot_stop_words"])) {
916 $qlcd_wp_chatbot_stop_words = sanitize_text_field($_POST["qlcd_wp_chatbot_stop_words"]);
917 update_option('qlcd_wp_chatbot_stop_words', $qlcd_wp_chatbot_stop_words);
918 }
919 //wpwbot icon settings.
920 $wp_chatbot_icon = isset( $_POST['wp_chatbot_icon'] ) ? sanitize_text_field($_POST['wp_chatbot_icon']) : 'icon-3.png';
921 update_option('wp_chatbot_icon', $wp_chatbot_icon);
922
923 $wp_chatbot_floatingiconbg_color = isset( $_POST['wp_chatbot_floatingiconbg_color'] ) ? sanitize_text_field($_POST['wp_chatbot_floatingiconbg_color']) : '#fff';
924 update_option('wp_chatbot_floatingiconbg_color', $wp_chatbot_floatingiconbg_color);
925
926 // upload custom wpwbot icon path
927 $wp_chatbot_custom_icon_path = sanitize_text_field($_POST['wp_chatbot_custom_icon_path']);
928 update_option('wp_chatbot_custom_icon_path', $wp_chatbot_custom_icon_path);
929 //Agent image
930 //wpwbot icon settings.
931 $wp_chatbot_icon = (isset($_POST['wp_chatbot_agent_image']) ? sanitize_text_field($_POST['wp_chatbot_agent_image']) : 'agent-0.png');
932 update_option('wp_chatbot_agent_image', $wp_chatbot_icon);
933 // upload custom wpwbot icon
934 if(isset($_POST['wp_chatbot_custom_agent_path'])){
935 $wp_chatbot_custom_agent_path = sanitize_text_field($_POST['wp_chatbot_custom_agent_path']);
936 update_option('wp_chatbot_custom_agent_path', $wp_chatbot_custom_agent_path);
937 }
938
939 //Theming
940 $qcld_wb_chatbot_theme = (isset($_POST['qcld_wb_chatbot_theme']) ? sanitize_text_field($_POST['qcld_wb_chatbot_theme']) : 'template-00');
941 update_option('qcld_wb_chatbot_theme', $qcld_wb_chatbot_theme);
942 //Theme custom background option
943 if(isset( $_POST["qcld_wb_chatbot_change_bg"])) {
944 $qcld_wb_chatbot_change_bg = sanitize_text_field($_POST["qcld_wb_chatbot_change_bg"]);
945 }else{$qcld_wb_chatbot_change_bg='';}
946 update_option('qcld_wb_chatbot_change_bg', $qcld_wb_chatbot_change_bg);
947 if(isset($_POST["qcld_wb_chatbot_board_bg_path"])){
948 $qcld_wb_chatbot_board_bg_path = sanitize_text_field($_POST["qcld_wb_chatbot_board_bg_path"]);
949 update_option('qcld_wb_chatbot_board_bg_path', wp_unslash($qcld_wb_chatbot_board_bg_path));
950 }
951
952
953
954 //To override style use custom css.
955 if(isset($_POST["wp_chatbot_custom_css"])){
956 $wp_chatbot_custom_css = wp_unslash($_POST["wp_chatbot_custom_css"]);
957 update_option('wp_chatbot_custom_css', $wp_chatbot_custom_css);
958 }
959
960 $qlcd_wp_chatbot_dialogflow_project_id= @$_POST["qlcd_wp_chatbot_dialogflow_project_id"];
961 update_option('qlcd_wp_chatbot_dialogflow_project_id', sanitize_text_field($qlcd_wp_chatbot_dialogflow_project_id));
962
963 $wp_chatbot_df_api= @$_POST["wp_chatbot_df_api"];
964 update_option('wp_chatbot_df_api', sanitize_text_field($wp_chatbot_df_api));
965
966
967
968 $qlcd_wp_chatbot_dialogflow_project_key= @$_POST["qlcd_wp_chatbot_dialogflow_project_key"];
969 update_option('qlcd_wp_chatbot_dialogflow_project_key', wp_unslash($qlcd_wp_chatbot_dialogflow_project_key));
970
971 /****Language center settings. ****/
972 //identity
973 $qlcd_wp_chatbot_host = @$_POST["qlcd_wp_chatbot_host"];
974 update_option('qlcd_wp_chatbot_host', sanitize_text_field($qlcd_wp_chatbot_host));
975 $qlcd_wp_chatbot_agent = @$_POST["qlcd_wp_chatbot_agent"];
976 update_option('qlcd_wp_chatbot_agent', sanitize_text_field($qlcd_wp_chatbot_agent));
977 $qlcd_wp_chatbot_shopper_demo_name = @$_POST["qlcd_wp_chatbot_shopper_demo_name"];
978 update_option('qlcd_wp_chatbot_shopper_demo_name', sanitize_text_field($qlcd_wp_chatbot_shopper_demo_name));
979 $qlcd_wp_chatbot_yes = @$_POST["qlcd_wp_chatbot_yes"];
980 update_option('qlcd_wp_chatbot_yes', sanitize_text_field($qlcd_wp_chatbot_yes));
981 $qlcd_wp_chatbot_no = @$_POST["qlcd_wp_chatbot_no"];
982 update_option('qlcd_wp_chatbot_no', sanitize_text_field($qlcd_wp_chatbot_no));
983 $qlcd_wp_chatbot_or = @$_POST["qlcd_wp_chatbot_or"];
984 update_option('qlcd_wp_chatbot_or', sanitize_text_field($qlcd_wp_chatbot_or));
985 $qlcd_wp_chatbot_sorry = @$_POST["qlcd_wp_chatbot_sorry"];
986 update_option('qlcd_wp_chatbot_sorry', sanitize_text_field($qlcd_wp_chatbot_sorry));
987 $qlcd_wp_chatbot_agent_join = @$_POST["qlcd_wp_chatbot_agent_join"];
988 update_option('qlcd_wp_chatbot_agent_join', serialize($qlcd_wp_chatbot_agent_join));
989 //Greeting.
990 $qlcd_wp_chatbot_welcome = @$_POST["qlcd_wp_chatbot_welcome"];
991 update_option('qlcd_wp_chatbot_welcome', serialize($qlcd_wp_chatbot_welcome));
992 $qlcd_wp_chatbot_back_to_start = @$_POST["qlcd_wp_chatbot_back_to_start"];
993 update_option('qlcd_wp_chatbot_back_to_start', serialize($qlcd_wp_chatbot_back_to_start));
994 $qlcd_wp_chatbot_hi_there = @$_POST["qlcd_wp_chatbot_hi_there"];
995 update_option('qlcd_wp_chatbot_hi_there', serialize($qlcd_wp_chatbot_hi_there));
996 $qlcd_wp_chatbot_welcome_back = @$_POST["qlcd_wp_chatbot_welcome_back"];
997 update_option('qlcd_wp_chatbot_welcome_back', serialize($qlcd_wp_chatbot_welcome_back));
998 $qlcd_wp_chatbot_asking_name = @$_POST["qlcd_wp_chatbot_asking_name"];
999 update_option('qlcd_wp_chatbot_asking_name', serialize($qlcd_wp_chatbot_asking_name));
1000 $qlcd_wp_chatbot_name_greeting = @$_POST["qlcd_wp_chatbot_name_greeting"];
1001 update_option('qlcd_wp_chatbot_name_greeting', serialize($qlcd_wp_chatbot_name_greeting));
1002 $qlcd_wp_chatbot_i_am = @$_POST["qlcd_wp_chatbot_i_am"];
1003 update_option('qlcd_wp_chatbot_i_am', serialize($qlcd_wp_chatbot_i_am));
1004 $qlcd_wp_chatbot_is_typing = @$_POST["qlcd_wp_chatbot_is_typing"];
1005 update_option('qlcd_wp_chatbot_is_typing', serialize($qlcd_wp_chatbot_is_typing));
1006 $qlcd_wp_chatbot_send_a_msg= @$_POST["qlcd_wp_chatbot_send_a_msg"];
1007 update_option('qlcd_wp_chatbot_send_a_msg', serialize($qlcd_wp_chatbot_send_a_msg));
1008 $qlcd_wp_chatbot_choose_option= @$_POST["qlcd_wp_chatbot_choose_option"];
1009 update_option('qlcd_wp_chatbot_choose_option', serialize($qlcd_wp_chatbot_choose_option));
1010 $qlcd_wp_chatbot_viewed_products= @$_POST["qlcd_wp_chatbot_viewed_products"];
1011 update_option('qlcd_wp_chatbot_viewed_products', serialize($qlcd_wp_chatbot_viewed_products));
1012 $qlcd_wp_chatbot_shopping_cart= @$_POST["qlcd_wp_chatbot_shopping_cart"];
1013 update_option('qlcd_wp_chatbot_shopping_cart', serialize($qlcd_wp_chatbot_shopping_cart));
1014 $qlcd_wp_chatbot_add_to_cart= @$_POST["qlcd_wp_chatbot_add_to_cart"];
1015 update_option('qlcd_wp_chatbot_add_to_cart', serialize($qlcd_wp_chatbot_add_to_cart));
1016 $qlcd_wp_chatbot_cart_link= @$_POST["qlcd_wp_chatbot_cart_link"];
1017 update_option('qlcd_wp_chatbot_cart_link', serialize($qlcd_wp_chatbot_cart_link));
1018 $qlcd_wp_chatbot_checkout_link= @$_POST["qlcd_wp_chatbot_checkout_link"];
1019 update_option('qlcd_wp_chatbot_checkout_link', serialize($qlcd_wp_chatbot_checkout_link));
1020 $qlcd_wp_chatbot_cart_welcome= @$_POST["qlcd_wp_chatbot_cart_welcome"];
1021 update_option('qlcd_wp_chatbot_cart_welcome', serialize($qlcd_wp_chatbot_cart_welcome));
1022 $qlcd_wp_chatbot_featured_product_welcome= @$_POST["qlcd_wp_chatbot_featured_product_welcome"];
1023 update_option('qlcd_wp_chatbot_featured_product_welcome', serialize($qlcd_wp_chatbot_featured_product_welcome));
1024 $qlcd_wp_chatbot_viewed_product_welcome= @$_POST["qlcd_wp_chatbot_viewed_product_welcome"];
1025 update_option('qlcd_wp_chatbot_viewed_product_welcome', serialize($qlcd_wp_chatbot_viewed_product_welcome));
1026 $qlcd_wp_chatbot_latest_product_welcome= @$_POST["qlcd_wp_chatbot_latest_product_welcome"];
1027 update_option('qlcd_wp_chatbot_latest_product_welcome', serialize($qlcd_wp_chatbot_latest_product_welcome));
1028 $qlcd_wp_chatbot_cart_title= @$_POST["qlcd_wp_chatbot_cart_title"];
1029 update_option('qlcd_wp_chatbot_cart_title', serialize($qlcd_wp_chatbot_cart_title));
1030 $qlcd_wp_chatbot_cart_quantity= @$_POST["qlcd_wp_chatbot_cart_quantity"];
1031 update_option('qlcd_wp_chatbot_cart_quantity', serialize($qlcd_wp_chatbot_cart_quantity));
1032 $qlcd_wp_chatbot_cart_price= @$_POST["qlcd_wp_chatbot_cart_price"];
1033 update_option('qlcd_wp_chatbot_cart_price', serialize($qlcd_wp_chatbot_cart_price));
1034 $qlcd_wp_chatbot_no_cart_items= @$_POST["qlcd_wp_chatbot_no_cart_items"];
1035 update_option('qlcd_wp_chatbot_no_cart_items', serialize($qlcd_wp_chatbot_no_cart_items));
1036 $qlcd_wp_chatbot_cart_updating= @$_POST["qlcd_wp_chatbot_cart_updating"];
1037 update_option('qlcd_wp_chatbot_cart_updating', serialize($qlcd_wp_chatbot_cart_updating));
1038 $qlcd_wp_chatbot_cart_removing= @$_POST["qlcd_wp_chatbot_cart_removing"];
1039 update_option('qlcd_wp_chatbot_cart_removing', serialize($qlcd_wp_chatbot_cart_removing));
1040 //wpwBot wildcard settings
1041 $qlcd_wp_chatbot_wildcard_msg = @$_POST["qlcd_wp_chatbot_wildcard_msg"];
1042 update_option('qlcd_wp_chatbot_wildcard_msg', serialize($qlcd_wp_chatbot_wildcard_msg));
1043 //empty filter message repeat.
1044 $qlcd_wp_chatbot_empty_filter_msg = @$_POST["qlcd_wp_chatbot_empty_filter_msg"];
1045 update_option('qlcd_wp_chatbot_empty_filter_msg', serialize($qlcd_wp_chatbot_empty_filter_msg));
1046
1047 $qlcd_wp_chatbot_did_you_mean = @$_POST["qlcd_wp_chatbot_did_you_mean"];
1048 update_option('qlcd_wp_chatbot_did_you_mean', serialize($qlcd_wp_chatbot_did_you_mean));
1049 //help welcome and message
1050 $qlcd_wp_chatbot_help_welcome = @$_POST["qlcd_wp_chatbot_help_welcome"];
1051 update_option('qlcd_wp_chatbot_help_welcome', serialize($qlcd_wp_chatbot_help_welcome));
1052 $qlcd_wp_chatbot_help_msg = @$_POST["qlcd_wp_chatbot_help_msg"];
1053 update_option('qlcd_wp_chatbot_help_msg', serialize($qlcd_wp_chatbot_help_msg));
1054 //To clear Conversation history.
1055 $qlcd_wp_chatbot_reset = @$_POST["qlcd_wp_chatbot_reset"];
1056 update_option('qlcd_wp_chatbot_reset', serialize($qlcd_wp_chatbot_reset));
1057 //systems keyword.
1058 $qlcd_wp_chatbot_sys_key_help = @$_POST["qlcd_wp_chatbot_sys_key_help"];
1059 update_option('qlcd_wp_chatbot_sys_key_help', sanitize_text_field($qlcd_wp_chatbot_sys_key_help));
1060 $qlcd_wp_chatbot_sys_key_product = @$_POST["qlcd_wp_chatbot_sys_key_product"];
1061 update_option('qlcd_wp_chatbot_sys_key_product', sanitize_text_field($qlcd_wp_chatbot_sys_key_product));
1062 $qlcd_wp_chatbot_sys_key_catalog = @$_POST["qlcd_wp_chatbot_sys_key_catalog"];
1063 update_option('qlcd_wp_chatbot_sys_key_catalog', sanitize_text_field($qlcd_wp_chatbot_sys_key_catalog));
1064 $qlcd_wp_chatbot_sys_key_order = @$_POST["qlcd_wp_chatbot_sys_key_order"];
1065 update_option('qlcd_wp_chatbot_sys_key_order', sanitize_text_field($qlcd_wp_chatbot_sys_key_order));
1066 $qlcd_wp_chatbot_sys_key_support = @$_POST["qlcd_wp_chatbot_sys_key_support"];
1067 update_option('qlcd_wp_chatbot_sys_key_support', sanitize_text_field($qlcd_wp_chatbot_sys_key_support));
1068 $qlcd_wp_chatbot_sys_key_reset = @$_POST["qlcd_wp_chatbot_sys_key_reset"];
1069 update_option('qlcd_wp_chatbot_sys_key_reset', sanitize_text_field($qlcd_wp_chatbot_sys_key_reset));
1070 $qlcd_wp_chatbot_wildcard_product = @$_POST["qlcd_wp_chatbot_wildcard_product"];
1071 update_option('qlcd_wp_chatbot_wildcard_product', serialize($qlcd_wp_chatbot_wildcard_product));
1072 $qlcd_wp_chatbot_wildcard_catalog = @$_POST["qlcd_wp_chatbot_wildcard_catalog"];
1073 update_option('qlcd_wp_chatbot_wildcard_catalog', serialize($qlcd_wp_chatbot_wildcard_catalog));
1074 $qlcd_wp_chatbot_featured_products = @$_POST["qlcd_wp_chatbot_featured_products"];
1075 update_option('qlcd_wp_chatbot_featured_products', serialize($qlcd_wp_chatbot_featured_products));
1076 $qlcd_wp_chatbot_sale_products = @$_POST["qlcd_wp_chatbot_sale_products"];
1077 update_option('qlcd_wp_chatbot_sale_products', serialize($qlcd_wp_chatbot_sale_products));
1078 $qlcd_wp_chatbot_wildcard_support = @$_POST["qlcd_wp_chatbot_wildcard_support"];
1079 update_option('qlcd_wp_chatbot_wildcard_support', sanitize_text_field($qlcd_wp_chatbot_wildcard_support));
1080 $qlcd_wp_chatbot_messenger_label = @$_POST["qlcd_wp_chatbot_messenger_label"];
1081 update_option('qlcd_wp_chatbot_messenger_label', serialize($qlcd_wp_chatbot_messenger_label));
1082 //Products search .
1083 if (isset($_POST["qlcd_wp_chatbot_product_success"])) {
1084 $qlcd_wp_chatbot_product_success = @$_POST["qlcd_wp_chatbot_product_success"];
1085 update_option('qlcd_wp_chatbot_product_success', serialize($qlcd_wp_chatbot_product_success));
1086 }
1087 if (isset($_POST["qlcd_wp_chatbot_product_fail"])) {
1088 $qlcd_wp_chatbot_product_fail = @$_POST["qlcd_wp_chatbot_product_fail"];
1089 update_option('qlcd_wp_chatbot_product_fail', serialize($qlcd_wp_chatbot_product_fail));
1090 }
1091 $qlcd_wp_chatbot_product_asking = @$_POST["qlcd_wp_chatbot_product_asking"];
1092 update_option('qlcd_wp_chatbot_product_asking', serialize($qlcd_wp_chatbot_product_asking));
1093 $qlcd_wp_chatbot_product_suggest = @$_POST["qlcd_wp_chatbot_product_suggest"];
1094 update_option('qlcd_wp_chatbot_product_suggest', serialize($qlcd_wp_chatbot_product_suggest));
1095 $qlcd_wp_chatbot_product_infinite = @$_POST["qlcd_wp_chatbot_product_infinite"];
1096 update_option('qlcd_wp_chatbot_product_infinite', serialize($qlcd_wp_chatbot_product_infinite));
1097 $qlcd_wp_chatbot_load_more = @$_POST["qlcd_wp_chatbot_load_more"];
1098 update_option('qlcd_wp_chatbot_load_more', serialize($qlcd_wp_chatbot_load_more));
1099 //Order
1100 $qlcd_wp_chatbot_wildcard_order = @$_POST["qlcd_wp_chatbot_wildcard_order"];
1101 update_option('qlcd_wp_chatbot_wildcard_order', serialize($qlcd_wp_chatbot_wildcard_order));
1102 $qlcd_wp_chatbot_order_welcome = @$_POST["qlcd_wp_chatbot_order_welcome"];
1103 update_option('qlcd_wp_chatbot_order_welcome', serialize($qlcd_wp_chatbot_order_welcome));
1104 $qlcd_wp_chatbot_order_username_asking = @$_POST["qlcd_wp_chatbot_order_username_asking"];
1105 update_option('qlcd_wp_chatbot_order_username_asking', serialize($qlcd_wp_chatbot_order_username_asking));
1106 $qlcd_wp_chatbot_order_username_not_exist = @$_POST["qlcd_wp_chatbot_order_username_not_exist"];
1107 update_option('qlcd_wp_chatbot_order_username_not_exist', serialize($qlcd_wp_chatbot_order_username_not_exist));
1108 $qlcd_wp_chatbot_order_username_thanks = @$_POST["qlcd_wp_chatbot_order_username_thanks"];
1109 update_option('qlcd_wp_chatbot_order_username_thanks', serialize($qlcd_wp_chatbot_order_username_thanks));
1110 $qlcd_wp_chatbot_order_username_password = @$_POST["qlcd_wp_chatbot_order_username_password"];
1111 update_option('qlcd_wp_chatbot_order_username_password', serialize($qlcd_wp_chatbot_order_username_password));
1112 $qlcd_wp_chatbot_order_password_incorrect= @$_POST["qlcd_wp_chatbot_order_password_incorrect"];
1113 update_option('qlcd_wp_chatbot_order_password_incorrect', serialize($qlcd_wp_chatbot_order_password_incorrect));
1114 $qlcd_wp_chatbot_order_not_found= @$_POST["qlcd_wp_chatbot_order_not_found"];
1115 update_option('qlcd_wp_chatbot_order_not_found', serialize($qlcd_wp_chatbot_order_not_found));
1116 $qlcd_wp_chatbot_order_found= @$_POST["qlcd_wp_chatbot_order_found"];
1117 update_option('qlcd_wp_chatbot_order_found', serialize($qlcd_wp_chatbot_order_found));
1118 $qlcd_wp_chatbot_order_email_support= @$_POST["qlcd_wp_chatbot_order_email_support"];
1119 update_option('qlcd_wp_chatbot_order_email_support', serialize($qlcd_wp_chatbot_order_email_support));
1120 //Support
1121 $qlcd_wp_chatbot_support_welcome = @$_POST["qlcd_wp_chatbot_support_welcome"];
1122 update_option('qlcd_wp_chatbot_support_welcome', serialize($qlcd_wp_chatbot_support_welcome));
1123 $qlcd_wp_chatbot_support_email = @$_POST["qlcd_wp_chatbot_support_email"];
1124 update_option('qlcd_wp_chatbot_support_email', sanitize_text_field($qlcd_wp_chatbot_support_email));
1125 $qlcd_wp_chatbot_asking_email = @$_POST["qlcd_wp_chatbot_asking_email"];
1126 update_option('qlcd_wp_chatbot_asking_email', serialize($qlcd_wp_chatbot_asking_email));
1127 $qlcd_wp_chatbot_asking_msg = @$_POST["qlcd_wp_chatbot_asking_msg"];
1128 update_option('qlcd_wp_chatbot_asking_msg', serialize($qlcd_wp_chatbot_asking_msg));
1129
1130 $qlcd_wp_chatbot_no_result = @$_POST["qlcd_wp_chatbot_no_result"];
1131 update_option('qlcd_wp_chatbot_no_result', serialize($qlcd_wp_chatbot_no_result));
1132
1133 $qlcd_wp_chatbot_support_option_again = @$_POST["qlcd_wp_chatbot_support_option_again"];
1134 update_option('qlcd_wp_chatbot_support_option_again', serialize($qlcd_wp_chatbot_support_option_again));
1135 $qlcd_wp_chatbot_invalid_email = @$_POST["qlcd_wp_chatbot_invalid_email"];
1136 update_option('qlcd_wp_chatbot_invalid_email', serialize($qlcd_wp_chatbot_invalid_email));
1137 $qlcd_wp_chatbot_support_phone= @$_POST["qlcd_wp_chatbot_support_phone"];
1138
1139 update_option('qlcd_wp_chatbot_support_phone', sanitize_text_field($qlcd_wp_chatbot_support_phone));
1140 $qlcd_wp_chatbot_asking_phone= @$_POST["qlcd_wp_chatbot_asking_phone"];
1141 update_option('qlcd_wp_chatbot_asking_phone', serialize($qlcd_wp_chatbot_asking_phone));
1142 $qlcd_wp_chatbot_thank_for_phone= @$_POST["qlcd_wp_chatbot_thank_for_phone"];
1143 update_option('qlcd_wp_chatbot_thank_for_phone', serialize($qlcd_wp_chatbot_thank_for_phone));
1144 $qlcd_wp_chatbot_admin_email = @$_POST["qlcd_wp_chatbot_admin_email"];
1145 update_option('qlcd_wp_chatbot_admin_email', sanitize_text_field($qlcd_wp_chatbot_admin_email));
1146
1147 $qlcd_wp_chatbot_email_sub = @$_POST["qlcd_wp_chatbot_email_sub"];
1148 update_option('qlcd_wp_chatbot_email_sub', sanitize_text_field($qlcd_wp_chatbot_email_sub));
1149
1150 $qlcd_wp_site_search = @$_POST["qlcd_wp_site_search"];
1151 update_option('qlcd_wp_site_search', sanitize_text_field($qlcd_wp_site_search));
1152
1153 $qlcd_wp_chatbot_email_sent = @$_POST["qlcd_wp_chatbot_email_sent"];
1154 update_option('qlcd_wp_chatbot_email_sent', sanitize_text_field($qlcd_wp_chatbot_email_sent));
1155 $qlcd_wp_chatbot_email_fail = @$_POST["qlcd_wp_chatbot_email_fail"];
1156 update_option('qlcd_wp_chatbot_email_fail', sanitize_text_field($qlcd_wp_chatbot_email_fail));
1157 //Notifications messages building.
1158 $qlcd_wp_chatbot_notification_interval = @$_POST["qlcd_wp_chatbot_notification_interval"];
1159 update_option('qlcd_wp_chatbot_notification_interval', sanitize_text_field($qlcd_wp_chatbot_notification_interval));
1160 $qlcd_wp_chatbot_notifications = @$_POST["qlcd_wp_chatbot_notifications"];
1161 update_option('qlcd_wp_chatbot_notifications', serialize($qlcd_wp_chatbot_notifications));
1162 //Support building part.
1163 $support_query = @$_POST["support_query"];
1164 update_option('support_query', serialize($support_query));
1165 $support_ans = @$_POST["support_ans"];
1166 update_option('support_ans', serialize($support_ans));
1167 //Create Mobile app pages.
1168 if(isset( $_POST["wp_chatbot_app_pages"])) {
1169 $wp_chatbot_app_pages = $_POST["wp_chatbot_app_pages"];
1170 }else{ $wp_chatbot_app_pages='';}
1171 update_option('wp_chatbot_app_pages', wp_unslash($wp_chatbot_app_pages));
1172 //Messenger Options
1173 if(isset( $_POST["enable_wp_chatbot_messenger"])) {
1174 $enable_wp_chatbot_messenger = $_POST["enable_wp_chatbot_messenger"];
1175 }else{ $enable_wp_chatbot_messenger='';}
1176 update_option('enable_wp_chatbot_messenger', wp_unslash($enable_wp_chatbot_messenger));
1177 if(isset( $_POST["enable_wp_chatbot_messenger_floating_icon"])) {
1178 $enable_wp_chatbot_messenger_floating_icon = $_POST["enable_wp_chatbot_messenger_floating_icon"];
1179 }else{ $enable_wp_chatbot_messenger_floating_icon='';}
1180 update_option('enable_wp_chatbot_messenger_floating_icon', wp_unslash($enable_wp_chatbot_messenger_floating_icon));
1181 $qlcd_wp_chatbot_fb_app_id = @$_POST["qlcd_wp_chatbot_fb_app_id"];
1182 update_option('qlcd_wp_chatbot_fb_app_id', sanitize_text_field($qlcd_wp_chatbot_fb_app_id));
1183 $qlcd_wp_chatbot_fb_page_id = @$_POST["qlcd_wp_chatbot_fb_page_id"];
1184 update_option('qlcd_wp_chatbot_fb_page_id', sanitize_text_field($qlcd_wp_chatbot_fb_page_id));
1185 $qlcd_wp_chatbot_fb_color= @$_POST["qlcd_wp_chatbot_fb_color"];
1186 update_option('qlcd_wp_chatbot_fb_color', wp_unslash($qlcd_wp_chatbot_fb_color));
1187 $qlcd_wp_chatbot_fb_in_msg = @$_POST["qlcd_wp_chatbot_fb_in_msg"];
1188 update_option('qlcd_wp_chatbot_fb_in_msg', sanitize_text_field($qlcd_wp_chatbot_fb_in_msg));
1189 $qlcd_wp_chatbot_fb_out_msg = @$_POST["qlcd_wp_chatbot_fb_out_msg"];
1190 update_option('qlcd_wp_chatbot_fb_out_msg', sanitize_text_field($qlcd_wp_chatbot_fb_out_msg));
1191 //Skype option
1192 if(isset( $_POST["enable_wp_chatbot_skype_floating_icon"])) {
1193 $enable_wp_chatbot_skype_floating_icon = $_POST["enable_wp_chatbot_skype_floating_icon"];
1194 }else{ $enable_wp_chatbot_skype_floating_icon='';}
1195 update_option('enable_wp_chatbot_skype_floating_icon', sanitize_text_field($enable_wp_chatbot_skype_floating_icon));
1196 if(isset( $_POST["enable_wp_chatbot_skype_id"])) {
1197 $enable_wp_chatbot_skype_id = $_POST["enable_wp_chatbot_skype_id"];
1198 }else{ $enable_wp_chatbot_skype_id='';}
1199 update_option('enable_wp_chatbot_skype_id', sanitize_text_field($enable_wp_chatbot_skype_id));
1200 //WhatsApp
1201 if(isset( $_POST["enable_wp_chatbot_whats"])) {
1202 $enable_wp_chatbot_whats= $_POST["enable_wp_chatbot_whats"];
1203 }else{ $enable_wp_chatbot_whats='';}
1204 update_option('enable_wp_chatbot_whats', sanitize_text_field($enable_wp_chatbot_whats));
1205 $qlcd_wp_chatbot_whats_label = @$_POST["qlcd_wp_chatbot_whats_label"];
1206 update_option('qlcd_wp_chatbot_whats_label', serialize($qlcd_wp_chatbot_whats_label));
1207 if(isset( $_POST["enable_wp_chatbot_floating_whats"])) {
1208 $enable_wp_chatbot_floating_whats= $_POST["enable_wp_chatbot_floating_whats"];
1209 }else{ $enable_wp_chatbot_floating_whats='';}
1210 update_option('enable_wp_chatbot_floating_whats', sanitize_text_field($enable_wp_chatbot_floating_whats));
1211 $qlcd_wp_chatbot_whats_num = @$_POST["qlcd_wp_chatbot_whats_num"];
1212 update_option('qlcd_wp_chatbot_whats_num', sanitize_text_field($qlcd_wp_chatbot_whats_num));
1213 //Viber
1214 if(isset( $_POST["enable_wp_chatbot_floating_viber"])) {
1215 $enable_wp_chatbot_floating_viber = $_POST["enable_wp_chatbot_floating_viber"];
1216 }else{ $enable_wp_chatbot_floating_viber='';}
1217 update_option('enable_wp_chatbot_floating_viber', sanitize_text_field($enable_wp_chatbot_floating_viber));
1218 $qlcd_wp_chatbot_viber_acc = @$_POST["qlcd_wp_chatbot_viber_acc"];
1219 update_option('qlcd_wp_chatbot_viber_acc', sanitize_text_field($qlcd_wp_chatbot_viber_acc));
1220 //Others integration
1221 if(isset( $_POST["enable_wp_chatbot_floating_phone"])) {
1222 $enable_wp_chatbot_floating_phone = $_POST["enable_wp_chatbot_floating_phone"];
1223 }else{ $enable_wp_chatbot_floating_phone='';}
1224 update_option('enable_wp_chatbot_floating_phone', sanitize_text_field($enable_wp_chatbot_floating_phone));
1225 $qlcd_wp_chatbot_phone = @$_POST["qlcd_wp_chatbot_phone"];
1226 update_option('qlcd_wp_chatbot_phone', sanitize_text_field($qlcd_wp_chatbot_phone));
1227
1228 if(isset( $_POST["enable_wp_chatbot_floating_link"])) {
1229 $enable_wp_chatbot_floating_link = $_POST["enable_wp_chatbot_floating_link"];
1230 }else{ $enable_wp_chatbot_floating_link='';}
1231 update_option('enable_wp_chatbot_floating_link', sanitize_text_field($enable_wp_chatbot_floating_link));
1232 $qlcd_wp_chatbot_weblink = @$_POST["qlcd_wp_chatbot_weblink"];
1233 update_option('qlcd_wp_chatbot_weblink', sanitize_text_field($qlcd_wp_chatbot_weblink));
1234
1235 //Re Targetting.
1236 $qlcd_wp_chatbot_ret_greet = @$_POST["qlcd_wp_chatbot_ret_greet"];
1237 update_option('qlcd_wp_chatbot_ret_greet', sanitize_text_field($qlcd_wp_chatbot_ret_greet));
1238
1239 if(isset( $_POST["enable_wp_chatbot_exit_intent"])) {
1240 $enable_wp_chatbot_exit_intent = $_POST["enable_wp_chatbot_exit_intent"];
1241 }else{ $enable_wp_chatbot_exit_intent='';}
1242 update_option('enable_wp_chatbot_exit_intent', sanitize_text_field($enable_wp_chatbot_exit_intent));
1243
1244 $wp_chatbot_exit_intent_msg = @$_POST["wp_chatbot_exit_intent_msg"];
1245 update_option('wp_chatbot_exit_intent_msg', wp_unslash($wp_chatbot_exit_intent_msg));
1246
1247 if(isset( $_POST["wp_chatbot_exit_intent_once"])) {
1248 $wp_chatbot_exit_intent_once = $_POST["wp_chatbot_exit_intent_once"];
1249 }else{ $wp_chatbot_exit_intent_once='';}
1250 update_option('wp_chatbot_exit_intent_once', sanitize_text_field($wp_chatbot_exit_intent_once));
1251
1252 if(isset( $_POST["enable_wp_chatbot_scroll_open"])) {
1253 $enable_wp_chatbot_scroll_open = $_POST["enable_wp_chatbot_scroll_open"];
1254 }else{ $enable_wp_chatbot_scroll_open='';}
1255 update_option('enable_wp_chatbot_scroll_open', sanitize_text_field($enable_wp_chatbot_scroll_open));
1256
1257 $wp_chatbot_scroll_open_msg= @$_POST["wp_chatbot_scroll_open_msg"];
1258 update_option('wp_chatbot_scroll_open_msg', wp_unslash($wp_chatbot_scroll_open_msg));
1259
1260 $wp_chatbot_scroll_percent= @$_POST["wp_chatbot_scroll_percent"];
1261 update_option('wp_chatbot_scroll_percent', wp_unslash($wp_chatbot_scroll_percent));
1262
1263 if(isset( $_POST["wp_chatbot_scroll_once"])) {
1264 $wp_chatbot_scroll_once = sanitize_text_field($_POST["wp_chatbot_scroll_once"]);
1265 }else{ $wp_chatbot_scroll_once='';}
1266 update_option('wp_chatbot_scroll_once', $wp_chatbot_scroll_once);
1267
1268 if(isset( $_POST["enable_wp_chatbot_auto_open"])) {
1269 $enable_wp_chatbot_auto_open = sanitize_text_field($_POST["enable_wp_chatbot_auto_open"]);
1270 }else{ $enable_wp_chatbot_auto_open='';}
1271 update_option('enable_wp_chatbot_auto_open', $enable_wp_chatbot_auto_open);
1272
1273 if(isset( $_POST["enable_wp_chatbot_ret_sound"])) {
1274 $enable_wp_chatbot_ret_sound = sanitize_text_field($_POST["enable_wp_chatbot_ret_sound"]);
1275 }else{ $enable_wp_chatbot_ret_sound='';}
1276 update_option('enable_wp_chatbot_ret_sound', $enable_wp_chatbot_ret_sound);
1277
1278 if(isset( $_POST["enable_wp_chatbot_sound_initial"])) {
1279 $enable_wp_chatbot_sound_initial = sanitize_text_field($_POST["enable_wp_chatbot_sound_initial"]);
1280 }else{ $enable_wp_chatbot_sound_initial='';}
1281 update_option('enable_wp_chatbot_sound_initial', $enable_wp_chatbot_sound_initial);
1282
1283
1284 $wp_chatbot_auto_open_msg = @$_POST["wp_chatbot_auto_open_msg"];
1285 update_option('wp_chatbot_auto_open_msg', wp_unslash($wp_chatbot_auto_open_msg));
1286
1287 $wp_chatbot_auto_open_time = @$_POST["wp_chatbot_auto_open_time"];
1288 update_option('wp_chatbot_auto_open_time', wp_unslash($wp_chatbot_auto_open_time));
1289 //to complate checkout
1290 if(isset( $_POST["enable_wp_chatbot_ret_user_show"])) {
1291 $enable_wp_chatbot_ret_user_show = sanitize_text_field($_POST["enable_wp_chatbot_ret_user_show"]);
1292 }else{ $enable_wp_chatbot_ret_user_show='';}
1293 update_option('enable_wp_chatbot_ret_user_show', $enable_wp_chatbot_ret_user_show);
1294
1295 if(isset( $_POST["enable_wp_chatbot_inactive_time_show"])) {
1296 $enable_wp_chatbot_inactive_time_show = sanitize_text_field($_POST["enable_wp_chatbot_inactive_time_show"]);
1297 }else{ $enable_wp_chatbot_inactive_time_show='';}
1298 update_option('enable_wp_chatbot_inactive_time_show', $enable_wp_chatbot_inactive_time_show);
1299
1300 $wp_chatbot_inactive_time = @$_POST["wp_chatbot_inactive_time"];
1301 update_option('wp_chatbot_inactive_time', sanitize_text_field($wp_chatbot_inactive_time));
1302
1303 $wp_chatbot_checkout_msg = @$_POST["wp_chatbot_checkout_msg"];
1304 update_option('wp_chatbot_checkout_msg', wp_unslash($wp_chatbot_checkout_msg));
1305
1306 if(isset( $_POST["wp_chatbot_auto_open_once"])) {
1307 $wp_chatbot_auto_open_once = sanitize_text_field($_POST["wp_chatbot_auto_open_once"]);
1308 }else{ $wp_chatbot_auto_open_once='';}
1309 update_option('wp_chatbot_auto_open_once', $wp_chatbot_auto_open_once);
1310
1311 if(isset( $_POST["wp_chatbot_inactive_once"])) {
1312 $wp_chatbot_inactive_once = sanitize_text_field($_POST["wp_chatbot_inactive_once"]);
1313 }else{ $wp_chatbot_inactive_once='';}
1314 update_option('wp_chatbot_inactive_once', $wp_chatbot_inactive_once);
1315
1316
1317 $wp_chatbot_proactive_bg_color = @$_POST["wp_chatbot_proactive_bg_color"];
1318 update_option('wp_chatbot_proactive_bg_color', sanitize_text_field($wp_chatbot_proactive_bg_color));
1319
1320 if(isset( $_POST["disable_wp_chatbot_call_gen"])) {
1321 $disable_wp_chatbot_call_gen = sanitize_text_field($_POST["disable_wp_chatbot_call_gen"]);
1322 }else{ $disable_wp_chatbot_call_gen='';}
1323 update_option('disable_wp_chatbot_call_gen', $disable_wp_chatbot_call_gen);
1324
1325 if(isset( $_POST["disable_wp_chatbot_site_search"])) {
1326 $disable_wp_chatbot_site_search = sanitize_text_field($_POST["disable_wp_chatbot_site_search"]);
1327 }else{ $disable_wp_chatbot_site_search='';}
1328 update_option('disable_wp_chatbot_site_search', $disable_wp_chatbot_site_search);
1329
1330 if(isset( $_POST["disable_wp_chatbot_call_sup"])) {
1331 $disable_wp_chatbot_call_sup = sanitize_text_field($_POST["disable_wp_chatbot_call_sup"]);
1332 }else{ $disable_wp_chatbot_call_sup='';}
1333 update_option('disable_wp_chatbot_call_sup', $disable_wp_chatbot_call_sup);
1334
1335 if(isset( $_POST["disable_wp_chatbot_feedback"])) {
1336 $disable_wp_chatbot_feedback = sanitize_text_field($_POST["disable_wp_chatbot_feedback"]);
1337 }else{ $disable_wp_chatbot_feedback='';}
1338 update_option('disable_wp_chatbot_feedback', $disable_wp_chatbot_feedback);
1339
1340 if(isset( $_POST["disable_wp_chatbot_faq"])) {
1341 $disable_wp_chatbot_faq = sanitize_text_field($_POST["disable_wp_chatbot_faq"]);
1342 }else{ $disable_wp_chatbot_faq='';}
1343 update_option('disable_wp_chatbot_faq', $disable_wp_chatbot_faq);
1344
1345 $qlcd_wp_chatbot_feedback_label = @$_POST["qlcd_wp_chatbot_feedback_label"];
1346 update_option('qlcd_wp_chatbot_feedback_label', serialize($qlcd_wp_chatbot_feedback_label));
1347
1348 if(isset( $_POST["enable_wp_chatbot_meta_title"])) {
1349 $enable_wp_chatbot_meta_title = sanitize_text_field($_POST["enable_wp_chatbot_meta_title"]);
1350 }else{ $enable_wp_chatbot_meta_title='';}
1351 update_option('enable_wp_chatbot_meta_title', $enable_wp_chatbot_meta_title);
1352
1353 $qlcd_wp_chatbot_meta_label = @$_POST["qlcd_wp_chatbot_meta_label"];
1354 update_option('qlcd_wp_chatbot_meta_label', sanitize_text_field($qlcd_wp_chatbot_meta_label));
1355
1356 $qlcd_wp_chatbot_phone_sent = @$_POST["qlcd_wp_chatbot_phone_sent"];
1357 update_option('qlcd_wp_chatbot_phone_sent', sanitize_text_field($qlcd_wp_chatbot_phone_sent));
1358
1359 $qlcd_wp_chatbot_phone_fail = @$_POST["qlcd_wp_chatbot_phone_fail"];
1360 update_option('qlcd_wp_chatbot_phone_fail', sanitize_text_field($qlcd_wp_chatbot_phone_fail));
1361
1362 if(isset( $_POST["enable_wp_chatbot_opening_hour"])) {
1363 $enable_wp_chatbot_opening_hour = sanitize_text_field($_POST["enable_wp_chatbot_opening_hour"]);
1364 }else{ $enable_wp_chatbot_opening_hour='';}
1365 update_option('enable_wp_chatbot_opening_hour', $enable_wp_chatbot_opening_hour);
1366
1367 $wpwbot_hours= @$_POST["wpwbot_hours"];
1368 update_option('wpwbot_hours', serialize($wpwbot_hours));
1369
1370 if(isset( $_POST["enable_wp_chatbot_dailogflow"])) {
1371 $enable_wp_chatbot_dailogflow = sanitize_text_field($_POST["enable_wp_chatbot_dailogflow"]);
1372 }else{ $enable_wp_chatbot_dailogflow='';}
1373 update_option('enable_wp_chatbot_dailogflow', $enable_wp_chatbot_dailogflow);
1374
1375 $qlcd_wp_chatbot_dialogflow_client_token= @$_POST["qlcd_wp_chatbot_dialogflow_client_token"];
1376 update_option('qlcd_wp_chatbot_dialogflow_client_token', sanitize_text_field($qlcd_wp_chatbot_dialogflow_client_token));
1377
1378 $qlcd_wp_chatbot_dialogflow_defualt_reply= @$_POST["qlcd_wp_chatbot_dialogflow_defualt_reply"];
1379 update_option('qlcd_wp_chatbot_dialogflow_defualt_reply', sanitize_text_field($qlcd_wp_chatbot_dialogflow_defualt_reply));
1380
1381 $qlcd_wp_chatbot_dialogflow_agent_language= @$_POST["qlcd_wp_chatbot_dialogflow_agent_language"];
1382 update_option('qlcd_wp_chatbot_dialogflow_agent_language', sanitize_text_field($qlcd_wp_chatbot_dialogflow_agent_language));
1383 // style option save
1384 if(isset( $_POST["enable_wp_chatbot_custom_color"])) {
1385 $enable_wp_chatbot_custom_color = $_POST["enable_wp_chatbot_custom_color"];
1386 }else{ $enable_wp_chatbot_custom_color='';}
1387 update_option('enable_wp_chatbot_custom_color', sanitize_text_field($enable_wp_chatbot_custom_color));
1388 $wp_chatbot_text_color = @$_POST["wp_chatbot_text_color"];
1389 update_option('wp_chatbot_text_color', sanitize_text_field($wp_chatbot_text_color));
1390
1391 $wp_chatbot_floatingiconbg_color = @$_POST["wp_chatbot_floatingiconbg_color"];
1392 update_option('wp_chatbot_floatingiconbg_color', sanitize_text_field($wp_chatbot_floatingiconbg_color));
1393
1394 $wp_chatbot_link_color = @$_POST["wp_chatbot_link_color"];
1395 update_option('wp_chatbot_link_color', sanitize_text_field($wp_chatbot_link_color));
1396
1397 $wp_chatbot_link_hover_color = @$_POST["wp_chatbot_link_hover_color"];
1398 update_option('wp_chatbot_link_hover_color', sanitize_text_field($wp_chatbot_link_hover_color));
1399
1400 $wp_chatbot_bot_msg_bg_color = @$_POST["wp_chatbot_bot_msg_bg_color"];
1401 update_option('wp_chatbot_bot_msg_bg_color', sanitize_text_field($wp_chatbot_bot_msg_bg_color));
1402
1403 $wp_chatbot_bot_msg_text_color = @$_POST["wp_chatbot_bot_msg_text_color"];
1404 update_option('wp_chatbot_bot_msg_text_color', sanitize_text_field($wp_chatbot_bot_msg_text_color));
1405
1406 $wp_chatbot_user_msg_bg_color = @$_POST["wp_chatbot_user_msg_bg_color"];
1407 update_option('wp_chatbot_user_msg_bg_color', sanitize_text_field($wp_chatbot_user_msg_bg_color));
1408
1409 $wp_chatbot_user_msg_text_color = @$_POST["wp_chatbot_user_msg_text_color"];
1410 update_option('wp_chatbot_user_msg_text_color', sanitize_text_field($wp_chatbot_user_msg_text_color));
1411
1412
1413 $wp_chatbot_buttons_bg_color = @$_POST["wp_chatbot_buttons_bg_color"];
1414 update_option('wp_chatbot_buttons_bg_color', sanitize_text_field($wp_chatbot_buttons_bg_color));
1415
1416 $wp_chatbot_buttons_text_color = @$_POST["wp_chatbot_buttons_text_color"];
1417 update_option('wp_chatbot_buttons_text_color', sanitize_text_field($wp_chatbot_buttons_text_color));
1418
1419 $wp_chatbot_buttons_bg_color_hover = @$_POST["wp_chatbot_buttons_bg_color_hover"];
1420 update_option('wp_chatbot_buttons_bg_color_hover', sanitize_text_field($wp_chatbot_buttons_bg_color_hover));
1421
1422 $wp_chatbot_buttons_text_color_hover = @$_POST["wp_chatbot_buttons_text_color_hover"];
1423 update_option('wp_chatbot_buttons_text_color_hover', sanitize_text_field($wp_chatbot_buttons_text_color_hover));
1424
1425
1426 $wp_chatbot_theme_secondary_color = @$_POST["wp_chatbot_theme_secondary_color"];
1427 update_option('wp_chatbot_theme_secondary_color', sanitize_text_field($wp_chatbot_theme_secondary_color));
1428 $wp_chatbot_header_background_color = @$_POST["wp_chatbot_header_background_color"];
1429 update_option('wp_chatbot_header_background_color', sanitize_text_field($wp_chatbot_header_background_color));
1430
1431 $wp_chatbot_theme_primary_color = @$_POST["wp_chatbot_theme_primary_color"];
1432 update_option('wp_chatbot_theme_primary_color', sanitize_text_field($wp_chatbot_theme_primary_color));
1433
1434
1435 $wp_chatbot_font_size = @$_POST["wp_chatbot_font_size"];
1436 update_option('wp_chatbot_font_size', sanitize_text_field($wp_chatbot_font_size));
1437 $wp_chat_bot_font_family = @$_POST["wp_chat_bot_font_family"];
1438 update_option('wp_chat_bot_font_family', $wp_chat_bot_font_family);
1439 $wp_chat_user_font_family = @$_POST["wp_chat_user_font_family"];
1440 update_option('wp_chat_user_font_family', $wp_chat_user_font_family);
1441 $wp_chatbot_user_font = @$_POST['wp_chatbot_user_font'];
1442 update_option('wp_chatbot_user_font', $wp_chatbot_user_font);
1443 $wp_chatbot_bot_font = @$_POST['wp_chatbot_bot_font'];
1444 update_option('wp_chatbot_bot_font', $wp_chatbot_bot_font);
1445 wp_enqueue_script( 'wp_chatbot_bot-front-js', plugins_url(basename(plugin_dir_path(__FILE__))) . '/js/sweetalrt.js', array('jquery'), '', true);
1446 $script = "
1447 console.log('sdaas');
1448 function callsweetalert(){
1449 Swal.fire({
1450 title: 'Your settings are saved.',
1451 html: '<p style=font-size:14px>Please clear your browser <b>cache</b> and <b>cookies</b> both and reload the front end before testing. Alternatively, you can launch a new browser window in <b>Incognito</b>/Private mode (Ctrl+Shift+N in chrome) to test.</p>',
1452 width: 450,
1453 icon: 'success',
1454 confirmButtonText: 'Got it',
1455 confirmButtonWidth: 100,
1456 confirmButtonClass: 'btn btn-lg'
1457 }).then((result) => {
1458 location.reload();
1459 })
1460 }
1461 callsweetalert();
1462 ";
1463
1464 wp_add_inline_script( 'wp_chatbot_bot-front-js', $script );
1465 }
1466 }
1467 }
1468 /**
1469 * Display Notifications on specific criteria.
1470 *
1471 * @since 2.14
1472 */
1473 public static function wpcommerce_inactive_notice_for_wp_chatbot()
1474 {
1475 if (current_user_can('activate_plugins')) :
1476 if (!class_exists('wpCommerce')) :
1477 deactivate_plugins(plugin_basename(__FILE__));
1478 ?>
1479 <div id="message" class="error">
1480 <p>
1481 <?php
1482 printf(
1483 __('%s WPBot for wpCommerce REQUIRES wpCommerce%s %swpCommerce%s must be active for WPBot to work. Please install & activate wpCommerce.', 'wpchatbot'),
1484 '<strong>',
1485 '</strong><br>',
1486 '<a href="http://wordpress.org/extend/plugins/wpcommerce/" target="_blank" >',
1487 '</a>'
1488 );
1489 ?>
1490 </p>
1491 </div>
1492 <?php
1493 elseif (version_compare(get_option('wpcommerce_db_version'), QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION, '<')) :
1494 ?>
1495 <div id="message" class="error">
1496 <!--<p style="float: right; color: #9A9A9A; font-size: 13px; font-style: italic;">For more information <a href="http://cxthemes.com/plugins/update-notice.html" target="_blank" style="color: inheret;">click here</a></p>-->
1497 <p>
1498 <?php
1499 printf(
1500 __('%WPBot for wpCommerce is inactive%s This version of WpBot requires wpCommerce %s or newer. For more information about our wpCommerce version support %sclick here%s.', 'wpchatbot'),
1501 '<strong>',
1502 '</strong><br>',
1503 QCLD_wpCHATBOT_REQUIRED_wpCOMMERCE_VERSION
1504 );
1505 ?>
1506 </p>
1507 <div style="clear:both;"></div>
1508 </div>
1509 <?php
1510 endif;
1511 endif;
1512 }
1513 /**
1514 * Admin notice for table reindex
1515 */
1516 public function admin_notice_reindex() { ?>
1517 <div class="updated notice is-dismissible">
1518 <p><?php printf( esc_html__( 'WPBot Pro : To Enable Title, Content, Excerpt, Categories, Tag and SKU Search Re-Index Products is required. %s', 'wpchatbot' ),'<a class="button button-secondary" href="'.esc_url( admin_url( 'admin.php?page=wpbot') ).'">'.esc_html__( 'Re-Index Products', 'wp_chatbot' ).'</a>'); ?></p>
1519 </div>
1520 <?php }
1521 }
1522 /**
1523 * Instantiate plugin.
1524 *
1525 */
1526 if (!function_exists('qcld_wb_chatboot_plugin_init')) {
1527 function qcld_wb_chatboot_plugin_init()
1528 {
1529 global $qcld_wb_chatbot;
1530 $qcld_wb_chatbot = qcld_wb_Chatbot::qcld_wb_chatbot_get_instance();
1531 }
1532 }
1533 add_action('plugins_loaded', 'qcld_wb_chatboot_plugin_init');
1534 /*
1535 * Initial Options will be insert as defualt data
1536 */
1537 register_activation_hook(__FILE__, 'qcld_wb_chatboot_defualt_options');
1538 function qcld_wb_chatboot_defualt_options(){
1539
1540 global $wpdb;
1541 $collate = '';
1542
1543 if ( $wpdb->has_cap( 'collation' ) ) {
1544
1545 if ( ! empty( $wpdb->charset ) ) {
1546
1547 $collate .= "DEFAULT CHARACTER SET $wpdb->charset";
1548 }
1549 if ( ! empty( $wpdb->collate ) ) {
1550
1551 $collate .= " COLLATE $wpdb->collate";
1552
1553 }
1554 }
1555
1556 //Bot User Table
1557 $table1 = $wpdb->prefix.'wpbot_sessions';
1558 $sql_sliders_Table1 = "
1559 CREATE TABLE IF NOT EXISTS `$table1` (
1560 `id` int(11) NOT NULL AUTO_INCREMENT,
1561 `session` int(11) NOT NULL,
1562 PRIMARY KEY (`id`)
1563 ) $collate AUTO_INCREMENT=1 ";
1564
1565 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
1566 dbDelta( $sql_sliders_Table1 );
1567
1568 //Bot Response Table
1569 $table1 = $wpdb->prefix.'wpbot_response';
1570 $sql_sliders_Table1 = "
1571 CREATE TABLE IF NOT EXISTS `$table1` (
1572 `id` INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
1573 `query` TEXT NOT NULL,
1574 `keyword` TEXT NOT NULL,
1575 `response` TEXT NOT NULL,
1576 `category` varchar(256) NOT NULL,
1577 `intent` varchar(256) NOT NULL,
1578 `custom` varchar(256) NOT NULL,
1579 FULLTEXT(`query`, `keyword`, `response`)
1580 ) $collate AUTO_INCREMENT=1 ENGINE=InnoDB";
1581
1582 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
1583 dbDelta( $sql_sliders_Table1 );
1584
1585 $sqlqry = $wpdb->get_results("select * from $table1");
1586 if(empty($sqlqry)){
1587
1588 $query = 'What Can WPBot do for you?';
1589 $response = 'WPBot can converse fluidly with users on website and FB messenger. It can search your website, send/collect eMails, user feedback & phone numbers . You can create Custom Intents from DialogFlow with Rich Messages & Card responses!';
1590
1591 $data = array('query' => $query, 'keyword' => '', 'response'=> $response, 'intent'=> '');
1592 $format = array('%s','%s', '%s', '%s');
1593 $wpdb->insert($table1,$data,$format);
1594 }
1595
1596 $url = get_site_url();
1597 $url = parse_url($url);
1598 $domain = $url['host'];
1599 //$admin_email = "admin@" . $domain;
1600 $admin_email = get_option('admin_email');
1601
1602 if(!get_option('wp_chatbot_position_x')) {
1603 update_option('wp_chatbot_position_x', 50);
1604 }
1605 if(!get_option('wp_chatbot_position_y')) {
1606 update_option('wp_chatbot_position_y', 50);
1607 }
1608 if(!get_option('disable_wp_chatbot')) {
1609 update_option('disable_wp_chatbot', '');
1610 }
1611 if(!get_option('disable_wp_chatbot_icon_animation')) {
1612 update_option('disable_wp_chatbot_icon_animation', '');
1613 }
1614 if(!get_option('disable_wp_chatbot_on_mobile')) {
1615 update_option('disable_wp_chatbot_on_mobile', '');
1616 }
1617 if(!get_option('qlcd_wp_chatbot_admin_email')) {
1618 update_option('qlcd_wp_chatbot_admin_email', get_option('admin_email'));
1619 }
1620 if(!get_option('disable_wp_chatbot_product_search')) {
1621 update_option('disable_wp_chatbot_product_search', '');
1622 }
1623 if(!get_option('disable_wp_chatbot_catalog')) {
1624 update_option('disable_wp_chatbot_catalog', '');
1625 }
1626 if(!get_option('disable_wp_chatbot_order_status')) {
1627 update_option('disable_wp_chatbot_order_status', '');
1628 }
1629 if(!get_option('enable_wp_chatbot_rtl')) {
1630 update_option('enable_wp_chatbot_rtl', '');
1631 }
1632 if(!get_option('show_menu_after_greetings')) {
1633 update_option('show_menu_after_greetings', '');
1634 }
1635 if(!get_option('enable_chat_session')) {
1636 update_option('enable_chat_session', '');
1637 }
1638
1639 if(!get_option('enable_wp_chatbot_mobile_full_screen')) {
1640 update_option('enable_wp_chatbot_mobile_full_screen', 1);
1641 }
1642 if(!get_option('wpbot_preloading_time')) {
1643 update_option('wpbot_preloading_time', '0.5');
1644 }
1645
1646 if(!get_option('disable_wp_chatbot_notification')) {
1647 update_option('disable_wp_chatbot_notification', '1');
1648 }
1649 if(!get_option('disable_wp_chatbot_cart_item_number')) {
1650 update_option('disable_wp_chatbot_cart_item_number', '');
1651 }
1652 if(!get_option('disable_wp_chatbot_featured_product')) {
1653 update_option('disable_wp_chatbot_featured_product', '');
1654 }
1655 if(!get_option('disable_wp_chatbot_sale_product')) {
1656 update_option('disable_wp_chatbot_sale_product', '');
1657 }
1658 if(!get_option('wp_chatbot_open_product_detail')) {
1659 update_option('wp_chatbot_open_product_detail', '');
1660 }
1661 if(!get_option('qlcd_wp_chatbot_product_orderby')) {
1662 update_option('qlcd_wp_chatbot_product_orderby', sanitize_text_field('title'));
1663 }
1664 if(!get_option('qlcd_wp_chatbot_product_order')) {
1665 update_option('qlcd_wp_chatbot_product_order', sanitize_text_field('ASC'));
1666 }
1667 if(!get_option('qlcd_wp_chatbot_ppp')) {
1668 update_option('qlcd_wp_chatbot_ppp', intval(6));
1669 }
1670 if(!get_option('wp_chatbot_exclude_stock_out_product')) {
1671 update_option('wp_chatbot_exclude_stock_out_product', '');
1672 }
1673 if(!get_option('wp_chatbot_show_sub_category')) {
1674 update_option('wp_chatbot_show_sub_category', '');
1675 }
1676 if(!get_option('wp_chatbot_vertical_custom')){
1677 update_option('wp_chatbot_vertical_custom', 'Go To');
1678 }
1679 if(!get_option('wp_chatbot_show_home_page')) {
1680 update_option('wp_chatbot_show_home_page', 'on');
1681 }
1682 if(!get_option('qc_wpbot_menu_order')) {
1683 update_option('qc_wpbot_menu_order', '');
1684 }
1685
1686 if(!get_option('wp_chatbot_show_posts')) {
1687 update_option('wp_chatbot_show_posts', 'on');
1688 }
1689 if(!get_option('wp_chatbot_show_pages')){
1690 update_option('wp_chatbot_show_pages', 'on');
1691 }
1692 if(!get_option('wp_chatbot_show_pages_list')) {
1693 update_option('wp_chatbot_show_pages_list', serialize(array()));
1694 }
1695 if(!get_option('wp_chatbot_exclude_post_list')) {
1696 update_option('wp_chatbot_exclude_post_list', serialize(array()));
1697 }
1698
1699 if(!get_option('wp_chatbot_show_wpcommerce')) {
1700 update_option('wp_chatbot_show_wpcommerce', 'on');
1701 }
1702 if(!get_option('qlcd_wp_chatbot_stop_words_name')) {
1703 update_option('qlcd_wp_chatbot_stop_words_name', 'english');
1704 }
1705 if(!get_option('qlcd_wp_chatbot_stop_words')) {
1706 update_option('qlcd_wp_chatbot_stop_words', "a,able,about,above,abst,accordance,according,accordingly,across,act,actually,added,adj,affected,affecting,affects,after,afterwards,again,against,ah,all,almost,alone,along,already,also,although,always,am,among,amongst,an,and,announce,another,any,anybody,anyhow,anymore,anyone,anything,anyway,anyways,anywhere,apparently,approximately,are,aren,arent,arise,around,as,aside,ask,asking,at,auth,available,away,awfully,b,back,be,became,because,become,becomes,becoming,been,before,beforehand,begin,beginning,beginnings,begins,behind,being,believe,below,beside,besides,between,beyond,biol,both,brief,briefly,but,by,c,ca,came,can,cannot,can't,cause,causes,certain,certainly,co,com,come,comes,contain,containing,contains,could,couldnt,d,date,did,didn't,different,do,does,doesn't,doing,done,don't,down,downwards,due,during,e,each,ed,edu,effect,eg,eight,eighty,either,else,elsewhere,end,ending,enough,especially,et,et-al,etc,even,ever,every,everybody,everyone,everything,everywhere,ex,except,f,far,few,ff,fifth,first,five,fix,followed,following,follows,for,former,formerly,forth,found,four,from,further,furthermore,g,gave,get,gets,getting,give,given,gives,giving,go,goes,gone,got,gotten,h,had,happens,hardly,has,hasn't,have,haven't,having,he,hed,hence,her,here,hereafter,hereby,herein,heres,hereupon,hers,herself,hes,hi,hid,him,himself,his,hither,home,how,howbeit,however,hundred,i,id,ie,if,i'll,im,immediate,immediately,importance,important,in,inc,indeed,index,information,instead,into,invention,inward,is,isn't,it,itd,it'll,its,itself,i've,j,just,k,keep,keeps,kept,kg,km,know,known,knows,l,largely,last,lately,later,latter,latterly,least,less,lest,let,lets,like,liked,likely,line,little,'ll,look,looking,looks,ltd,m,made,mainly,make,makes,many,may,maybe,me,mean,means,meantime,meanwhile,merely,mg,might,million,miss,ml,more,moreover,most,mostly,mr,mrs,much,mug,must,my,myself,n,na,name,namely,nay,nd,near,nearly,necessarily,necessary,need,needs,neither,never,nevertheless,new,next,nine,ninety,no,nobody,non,none,nonetheless,noone,nor,normally,nos,not,noted,nothing,now,nowhere,o,obtain,obtained,obviously,of,off,often,oh,ok,okay,old,omitted,on,once,one,ones,only,onto,or,ord,other,others,otherwise,ought,our,ours,ourselves,out,outside,over,overall,owing,own,p,page,pages,part,particular,particularly,past,per,perhaps,placed,please,plus,poorly,possible,possibly,potentially,pp,predominantly,present,previously,primarily,probably,promptly,proud,provides,put,q,que,quickly,quite,qv,r,ran,rather,rd,re,readily,really,recent,recently,ref,refs,regarding,regardless,regards,related,relatively,research,respectively,resulted,resulting,results,right,run,s,said,same,saw,say,saying,says,sec,section,see,seeing,seem,seemed,seeming,seems,seen,self,selves,sent,seven,several,shall,she,shed,she'll,shes,should,shouldn't,show,showed,shown,showns,shows,significant,significantly,similar,similarly,since,six,slightly,so,some,somebody,somehow,someone,somethan,something,sometime,sometimes,somewhat,somewhere,soon,sorry,specifically,specified,specify,specifying,still,stop,strongly,sub,substantially,successfully,such,sufficiently,suggest,sup,sure,t,take,taken,taking,tell,tends,th,than,thank,thanks,thanx,that,that'll,thats,that've,the,their,theirs,them,themselves,then,thence,there,thereafter,thereby,thered,therefore,therein,there'll,thereof,therere,theres,thereto,thereupon,there've,these,they,theyd,they'll,theyre,they've,think,this,those,thou,though,thoughh,thousand,throug,through,throughout,thru,thus,til,tip,to,together,too,took,toward,towards,tried,tries,truly,try,trying,ts,twice,two,u,un,under,unfortunately,unless,unlike,unlikely,until,unto,up,upon,ups,us,use,used,useful,usefully,usefulness,uses,using,usually,v,value,various,'ve,very,via,viz,vol,vols,vs,w,want,wants,was,wasnt,way,we,wed,welcome,we'll,went,were,werent,we've,what,whatever,what'll,whats,when,whence,whenever,where,whereafter,whereas,whereby,wherein,wheres,whereupon,wherever,whether,which,while,whim,whither,who,whod,whoever,whole,who'll,whom,whomever,whos,whose,why,widely,willing,wish,with,within,without,wont,words,world,would,wouldnt,www,x,y,yes,yet,you,youd,you'll,your,youre,yours,yourself,yourselves,you've,z,zero");
1707 }
1708 if(!get_option('qlcd_wp_chatbot_order_user')) {
1709 update_option('qlcd_wp_chatbot_order_user', sanitize_text_field('login'));
1710 }
1711 if(!get_option('wp_chatbot_custom_agent_path')) {
1712 update_option('wp_chatbot_custom_agent_path', '');
1713 }
1714 if(!get_option('wp_chatbot_custom_icon_path')) {
1715 update_option('wp_chatbot_custom_icon_path', '');
1716 }
1717
1718 if(!get_option('wp_chatbot_icon')) {
1719 update_option('wp_chatbot_icon', sanitize_text_field('icon-13.png'));
1720 }
1721 if(!get_option('wp_chatbot_floatingiconbg_color')) {
1722 update_option('wp_chatbot_floatingiconbg_color', '#fff');
1723 }
1724 if(!get_option('wp_chatbot_agent_image')){
1725 update_option('wp_chatbot_agent_image',sanitize_text_field('agent-0.png'));
1726 }
1727 if(!get_option('qcld_wb_chatbot_theme')) {
1728 update_option('qcld_wb_chatbot_theme', sanitize_text_field('template-00'));
1729 }
1730 if(!get_option('qcld_wb_chatbot_change_bg')) {
1731 update_option('qcld_wb_chatbot_change_bg', '');
1732 }
1733 if(!get_option('wp_chatbot_custom_css')) {
1734 update_option('wp_chatbot_custom_css', '');
1735 }
1736 if(!get_option('qlcd_wp_chatbot_host')) {
1737 update_option('qlcd_wp_chatbot_host', sanitize_text_field('Our Website'));
1738 }
1739 if(!get_option('qlcd_wp_chatbot_agent')) {
1740 update_option('qlcd_wp_chatbot_agent', sanitize_text_field('Carrie'));
1741 }
1742 if(!get_option('qlcd_wp_chatbot_host')) {
1743 update_option('qlcd_wp_chatbot_host', sanitize_text_field('Our Website'));
1744 }
1745 if(!get_option('qlcd_wp_chatbot_shopper_demo_name')) {
1746 update_option('qlcd_wp_chatbot_shopper_demo_name', sanitize_text_field('Amigo'));
1747 }
1748 if(!get_option('qlcd_wp_chatbot_yes')) {
1749 update_option('qlcd_wp_chatbot_yes', sanitize_text_field('YES'));
1750 }
1751 if(!get_option('qlcd_wp_chatbot_no')) {
1752 update_option('qlcd_wp_chatbot_no', sanitize_text_field('NO'));
1753 }
1754 if(!get_option('qlcd_wp_chatbot_or')) {
1755 update_option('qlcd_wp_chatbot_or', sanitize_text_field('OR'));
1756 }
1757 if(!get_option('qlcd_wp_chatbot_sorry')) {
1758 update_option('qlcd_wp_chatbot_sorry', sanitize_text_field('Sorry'));
1759 }
1760
1761 if(!get_option('qlcd_wp_chatbot_dialogflow_project_id')) {
1762 update_option('qlcd_wp_chatbot_dialogflow_project_id', '');
1763 }
1764 if(!get_option('wp_chatbot_df_api')) {
1765 update_option('wp_chatbot_df_api', 'v1');
1766 }
1767
1768
1769 if(!get_option('qlcd_wp_chatbot_dialogflow_project_key')) {
1770 update_option('qlcd_wp_chatbot_dialogflow_project_key', '');
1771 }
1772
1773 if(!get_option('qlcd_wp_chatbot_agent_join')) {
1774 update_option('qlcd_wp_chatbot_agent_join', serialize(array('has joined the conversation')));
1775 }
1776 if(!get_option('qlcd_wp_chatbot_welcome')) {
1777 update_option('qlcd_wp_chatbot_welcome', serialize(array('Welcome to', 'Glad to have you at')));
1778 }
1779 if(!get_option('qlcd_wp_chatbot_back_to_start')) {
1780 update_option('qlcd_wp_chatbot_back_to_start', serialize(array('Back to Start')));
1781 }
1782 if(!get_option('qlcd_wp_chatbot_hi_there')) {
1783 update_option('qlcd_wp_chatbot_hi_there', serialize(array('Hi There!')));
1784 }
1785 if(!get_option('qlcd_wp_chatbot_welcome_back')) {
1786 update_option('qlcd_wp_chatbot_welcome_back', serialize(array('Welcome back', 'Good to see your again')));
1787 }
1788 if(!get_option('qlcd_wp_chatbot_asking_name')) {
1789 update_option('qlcd_wp_chatbot_asking_name', serialize(array('May I know your name?', 'What should I call you?')));
1790 }
1791 if(!get_option('qlcd_wp_chatbot_name_greeting')) {
1792 update_option('qlcd_wp_chatbot_name_greeting', serialize(array('Nice to meet you')));
1793 }
1794 if(!get_option('qlcd_wp_chatbot_i_am')) {
1795 update_option('qlcd_wp_chatbot_i_am', serialize(array('I am', 'This is')));
1796 }
1797 if(!get_option('qlcd_wp_chatbot_is_typing')) {
1798 update_option('qlcd_wp_chatbot_is_typing', serialize(array('is typing...')));
1799 }
1800 if(!get_option('qlcd_wp_chatbot_send_a_msg')) {
1801 update_option('qlcd_wp_chatbot_send_a_msg', serialize(array('Send a message.')));
1802 }
1803 if(!get_option('qlcd_wp_chatbot_choose_option')) {
1804 update_option('qlcd_wp_chatbot_choose_option', serialize(array('Choose an option.')));
1805 }
1806 if(!get_option('qlcd_wp_chatbot_viewed_products')) {
1807 update_option('qlcd_wp_chatbot_viewed_products', serialize(array('Recently viewed products')));
1808 }
1809 if(!get_option('qlcd_wp_chatbot_add_to_cart')) {
1810 update_option('qlcd_wp_chatbot_add_to_cart', serialize(array('Add to Cart')));
1811 }
1812 if(!get_option('qlcd_wp_chatbot_cart_link')) {
1813 update_option('qlcd_wp_chatbot_cart_link', serialize(array('Cart')));
1814 }
1815 if(!get_option('qlcd_wp_chatbot_checkout_link')) {
1816 update_option('qlcd_wp_chatbot_checkout_link', serialize(array('Checkout')));
1817 }
1818 if(!get_option('qlcd_wp_chatbot_featured_product_welcome')) {
1819 update_option('qlcd_wp_chatbot_featured_product_welcome', serialize(array('I have found following featured products')));
1820 }
1821 if(!get_option('qlcd_wp_chatbot_viewed_product_welcome')) {
1822 update_option('qlcd_wp_chatbot_viewed_product_welcome', serialize(array('I have found following recently viewed products')));
1823 }
1824 if(!get_option('qlcd_wp_chatbot_latest_product_welcome')) {
1825 update_option('qlcd_wp_chatbot_latest_product_welcome', serialize(array('I have found following latest products')));
1826 }
1827 if(!get_option('qlcd_wp_chatbot_cart_welcome')) {
1828 update_option('qlcd_wp_chatbot_cart_welcome', serialize(array('I have found following items from Shopping Cart.')));
1829 }
1830 if(!get_option('qlcd_wp_chatbot_cart_title')) {
1831 update_option('qlcd_wp_chatbot_cart_title', serialize(array('Title')));
1832 }
1833 if(!get_option('qlcd_wp_chatbot_cart_quantity')) {
1834 update_option('qlcd_wp_chatbot_cart_quantity', serialize(array('Qty')));
1835 }
1836 if(!get_option('qlcd_wp_chatbot_cart_price')) {
1837 update_option('qlcd_wp_chatbot_cart_price', serialize(array('Price')));
1838 }
1839 if(!get_option('qlcd_wp_chatbot_no_cart_items')) {
1840 update_option('qlcd_wp_chatbot_no_cart_items', serialize(array('No items in the cart')));
1841 }
1842 if(!get_option('qlcd_wp_chatbot_cart_updating')) {
1843 update_option('qlcd_wp_chatbot_cart_updating', serialize(array('Updating cart items ...')));
1844 }
1845 if(!get_option('qlcd_wp_chatbot_cart_removing')) {
1846 update_option('qlcd_wp_chatbot_cart_removing', serialize(array('Removing cart items ...')));
1847 }
1848 if(!get_option('qlcd_wp_chatbot_wildcard_msg')) {
1849 update_option('qlcd_wp_chatbot_wildcard_msg', serialize(array('I am here to find what you need. What are you looking for?')));
1850 }
1851 if(!get_option('qlcd_wp_chatbot_empty_filter_msg')) {
1852 update_option('qlcd_wp_chatbot_empty_filter_msg', serialize(array('Sorry, I did not understand you.')));
1853 }
1854 if(!get_option('qlcd_wp_chatbot_did_you_mean')) {
1855 update_option('qlcd_wp_chatbot_did_you_mean', serialize(array('Did you mean?')));
1856 }
1857 if(!get_option('qlcd_wp_chatbot_sys_key_help')) {
1858 update_option('qlcd_wp_chatbot_sys_key_help', 'start');
1859 }
1860 if(!get_option('qlcd_wp_chatbot_sys_key_product')) {
1861 update_option('qlcd_wp_chatbot_sys_key_product', 'product');
1862 }
1863 if(!get_option('qlcd_wp_chatbot_sys_key_catalog')) {
1864 update_option('qlcd_wp_chatbot_sys_key_catalog', 'catalog');
1865 }
1866 if(!get_option('qlcd_wp_chatbot_sys_key_order')) {
1867 update_option('qlcd_wp_chatbot_sys_key_order', 'order');
1868 }
1869 if(!get_option('qlcd_wp_chatbot_sys_key_support')) {
1870 update_option('qlcd_wp_chatbot_sys_key_support', 'faq');
1871 }
1872 if(!get_option('qlcd_wp_chatbot_sys_key_reset')) {
1873 update_option('qlcd_wp_chatbot_sys_key_reset', 'reset');
1874 }
1875 if(!get_option('qlcd_wp_chatbot_help_welcome')) {
1876 update_option('qlcd_wp_chatbot_help_welcome', serialize(array('Welcome to Help Section.')));
1877 }
1878 if(!get_option('qlcd_wp_chatbot_help_msg')) {
1879 update_option('qlcd_wp_chatbot_help_msg', serialize(array('<h3>Type and Hit Enter</h3> 1. <b>start</b> Get back to the main menu. <br> 2. <b>faq</b> for FAQ. <br> 3. <b>eMail </b> to Send eMail <br> 4. <b>reset</b> To clear chat history and start from the beginning.')));
1880 }
1881 if(!get_option('qlcd_wp_chatbot_reset')) {
1882 update_option('qlcd_wp_chatbot_reset', serialize(array('Do you want to clear our chat history and start over?')));
1883 }
1884 if(!get_option('qlcd_wp_chatbot_wildcard_product')) {
1885 update_option('qlcd_wp_chatbot_wildcard_product', serialize(array('Product Search')));
1886 }
1887 if(!get_option('qlcd_wp_chatbot_wildcard_catalog')) {
1888 update_option('qlcd_wp_chatbot_wildcard_catalog', serialize(array('Catalog')));
1889 }
1890 if(!get_option('qlcd_wp_chatbot_featured_products')) {
1891 update_option('qlcd_wp_chatbot_featured_products', serialize(array('Featured Products')));
1892 }
1893 if(!get_option('qlcd_wp_chatbot_sale_products')) {
1894 update_option('qlcd_wp_chatbot_sale_products', serialize(array('Products on Sale')));
1895 }
1896 if(!get_option('qlcd_wp_chatbot_wildcard_support')) {
1897 update_option('qlcd_wp_chatbot_wildcard_support', 'FAQ');
1898 }
1899 if(!get_option('qlcd_wp_chatbot_messenger_label')) {
1900 update_option('qlcd_wp_chatbot_messenger_label', serialize(array('Chat with Us on Facebook Messenger')));
1901 }
1902 if(!get_option('qlcd_wp_chatbot_product_success')) {
1903 update_option('qlcd_wp_chatbot_product_success', serialize(array('Great! We have these products for', 'Found these products for')));
1904 }
1905 if(!get_option('qlcd_wp_chatbot_product_fail')) {
1906 update_option('qlcd_wp_chatbot_product_fail', serialize(array('Oops! Nothing matches your criteria', 'Sorry, I found nothing')));
1907 }
1908 if(!get_option('qlcd_wp_chatbot_product_asking')) {
1909 update_option('qlcd_wp_chatbot_product_asking', serialize(array('What are you shopping for?')));
1910 }
1911 if(!get_option('qlcd_wp_chatbot_product_suggest')) {
1912 update_option('qlcd_wp_chatbot_product_suggest', serialize(array('You can browse our extensive catalog. Just pick a category from below:')));
1913 }
1914 if(!get_option('qlcd_wp_chatbot_product_infinite')) {
1915 update_option('qlcd_wp_chatbot_product_infinite', serialize(array('Too many choices? Let\'s try another search term', 'I may have something else for you. Why not search again?')));
1916 }
1917 if(!get_option('qlcd_wp_chatbot_load_more')) {
1918 update_option('qlcd_wp_chatbot_load_more', serialize(array('Load More')));
1919 }
1920 if(!get_option('qlcd_wp_chatbot_wildcard_order')) {
1921 update_option('qlcd_wp_chatbot_wildcard_order', serialize(array('Order Status')));
1922 }
1923 if(!get_option('qlcd_wp_chatbot_order_welcome')) {
1924 update_option('qlcd_wp_chatbot_order_welcome', serialize(array('Welcome to Order status section!')));
1925 }
1926 if(!get_option('qlcd_wp_chatbot_order_username_asking')) {
1927 update_option('qlcd_wp_chatbot_order_username_asking', serialize(array('Please type your username?')));
1928 }
1929 if(!get_option('qlcd_wp_chatbot_order_username_password')) {
1930 update_option('qlcd_wp_chatbot_order_username_password', serialize(array('Please type your password')));
1931 }
1932 if(!get_option('qlcd_wp_chatbot_order_username_not_exist')) {
1933 update_option('qlcd_wp_chatbot_order_username_not_exist', serialize(array('This username does not exist.')));
1934 }
1935 if(!get_option('qlcd_wp_chatbot_order_username_thanks')) {
1936 update_option('qlcd_wp_chatbot_order_username_thanks', serialize(array('Thank you for the username')));
1937 }
1938 if(!get_option('qlcd_wp_chatbot_order_password_incorrect')) {
1939 update_option('qlcd_wp_chatbot_order_password_incorrect', serialize(array('Sorry Password is not correct!')));
1940 }
1941 if(!get_option('qlcd_wp_chatbot_asking_email')) {
1942 update_option('qlcd_wp_chatbot_asking_email', serialize(array('Please provide your email address')));
1943 }
1944 if(!get_option('qlcd_wp_chatbot_order_not_found')) {
1945 update_option('qlcd_wp_chatbot_order_not_found', serialize(array('I did not find any order by you')));
1946 }
1947 if(!get_option('qlcd_wp_chatbot_order_found')) {
1948 update_option('qlcd_wp_chatbot_order_found', serialize(array('I have found the following orders')));
1949 }
1950 if(!get_option('qlcd_wp_chatbot_order_email_support')) {
1951 update_option('qlcd_wp_chatbot_order_email_support', serialize(array('Email our support center about your order.')));
1952 }
1953 if(!get_option('qlcd_wp_chatbot_support_welcome')) {
1954 update_option('qlcd_wp_chatbot_support_welcome', serialize(array('Welcome to FAQ Section')));
1955 }
1956 if(!get_option('qlcd_wp_chatbot_support_email')) {
1957 update_option('qlcd_wp_chatbot_support_email', 'Send us Email.');
1958 }
1959 if(!get_option('qlcd_wp_chatbot_asking_msg')) {
1960 update_option('qlcd_wp_chatbot_asking_msg', serialize(array('Thank you for email address. Please write your message now.')));
1961 }
1962 if(!get_option('qlcd_wp_chatbot_no_result')) {
1963 update_option('qlcd_wp_chatbot_no_result', serialize(array('Sorry, No result found!')));
1964 }
1965 if(!get_option('qlcd_wp_chatbot_invalid_email')) {
1966 update_option('qlcd_wp_chatbot_invalid_email', serialize(array('Sorry, Email address is not valid! Please provide a valid email.')));
1967 }
1968 if(!get_option('qlcd_wp_chatbot_support_phone')) {
1969 update_option('qlcd_wp_chatbot_support_phone', 'Leave your number. We will call you back!');
1970 }
1971 if(!get_option('qlcd_wp_chatbot_asking_phone')) {
1972 update_option('qlcd_wp_chatbot_asking_phone', serialize(array('Please provide your Phone number')));
1973 }
1974 if(!get_option('qlcd_wp_chatbot_thank_for_phone')) {
1975 update_option('qlcd_wp_chatbot_thank_for_phone', serialize(array('Thank you for Phone number')));
1976 }
1977 if(!get_option('qlcd_wp_chatbot_support_option_again')) {
1978 update_option('qlcd_wp_chatbot_support_option_again', serialize(array('You may choose option from below.')));
1979 }
1980 if(!get_option('qlcd_wp_chatbot_admin_email')) {
1981 update_option('qlcd_wp_chatbot_admin_email', $admin_email);
1982 }
1983 if(!get_option('qlcd_wp_chatbot_email_sub')) {
1984 update_option('qlcd_wp_chatbot_email_sub', sanitize_text_field('WPBot Support Mail'));
1985 }
1986 if(!get_option('qlcd_wp_site_search')) {
1987 update_option('qlcd_wp_site_search', sanitize_text_field('Site Search'));
1988 }
1989 if(!get_option('qlcd_wp_chatbot_email_sent')) {
1990 update_option('qlcd_wp_chatbot_email_sent', sanitize_text_field('Your email was sent successfully.Thanks!'));
1991 }
1992 if(!get_option('qlcd_wp_chatbot_email_fail')) {
1993 update_option('qlcd_wp_chatbot_email_fail', sanitize_text_field('Sorry! I could not send your mail! Please contact the webmaster.'));
1994 }
1995 if(!get_option('qlcd_wp_chatbot_notification_interval')) {
1996 update_option('qlcd_wp_chatbot_notification_interval', sanitize_text_field(5));
1997 }
1998 if(!get_option('qlcd_wp_chatbot_notifications')) {
1999 update_option('qlcd_wp_chatbot_notifications', serialize(array('Welcome to WPBot')));
2000 }
2001 if(!get_option('support_query')) {
2002 update_option('support_query', serialize(array('What is WPBot?')));
2003 }
2004 if(!get_option('support_ans')) {
2005 update_option('support_ans', serialize(array('WPBot is a stand alone Chat Bot with zero configuration or bot training required. This plug and play chatbot also does not require any 3rd party service integration like Facebook. This chat bot helps shoppers find the products they are looking for easily and increase store sales! WPBot is a must have plugin for trending conversational commerce or conversational shopping.')));
2006 }
2007 if(!get_option('qlcd_wp_chatbot_search_option')) {
2008 update_option('qlcd_wp_chatbot_search_option', 'standard');
2009 }
2010 if(!get_option('wp_chatbot_index_count')) {
2011 update_option('wp_chatbot_index_count', 0);
2012 }
2013 if(!get_option('wp_chatbot_app_pages')) {
2014 update_option('wp_chatbot_app_pages', 0);
2015 }
2016 //messenger options.
2017 if(!get_option('enable_wp_chatbot_messenger')) {
2018 update_option('enable_wp_chatbot_messenger', '');
2019 }
2020 if(!get_option('enable_wp_chatbot_messenger_floating_icon')) {
2021 update_option('enable_wp_chatbot_messenger_floating_icon', '');
2022 }
2023 if(!get_option('qlcd_wp_chatbot_fb_app_id')) {
2024 update_option('qlcd_wp_chatbot_fb_app_id', '');
2025 }
2026 if(!get_option('qlcd_wp_chatbot_fb_page_id')) {
2027 update_option('qlcd_wp_chatbot_fb_page_id', '');
2028 }
2029 if(!get_option('qlcd_wp_chatbot_fb_color')) {
2030 update_option('qlcd_wp_chatbot_fb_color', '#0084ff');
2031 }
2032 if(!get_option('qlcd_wp_chatbot_fb_in_msg')) {
2033 update_option('qlcd_wp_chatbot_fb_in_msg', 'Welcome to WPBot!');
2034 }
2035 if(!get_option('qlcd_wp_chatbot_fb_out_msg')) {
2036 update_option('qlcd_wp_chatbot_fb_out_msg', 'You are not logged in');
2037 }
2038 //Skype option
2039 if(!get_option('enable_wp_chatbot_skype_floating_icon')) {
2040 update_option('enable_wp_chatbot_skype_floating_icon', '');
2041 }
2042 if(!get_option('enable_wp_chatbot_skype_id')) {
2043 update_option('enable_wp_chatbot_skype_id', '');
2044 }
2045 //Whats App
2046 if(!get_option('enable_wp_chatbot_whats')) {
2047 update_option('enable_wp_chatbot_whats', '');
2048 }
2049 if(!get_option('qlcd_wp_chatbot_whats_label')) {
2050 update_option('qlcd_wp_chatbot_whats_label', serialize(array('Chat with Us on WhatsApp')));
2051 }
2052 if(!get_option('enable_wp_chatbot_floating_whats')) {
2053 update_option('enable_wp_chatbot_floating_whats', '');
2054 }
2055 if(!get_option('qlcd_wp_chatbot_whats_num')) {
2056 update_option('qlcd_wp_chatbot_whats_num', '');
2057 }
2058 //Viber
2059 if(!get_option('enable_wp_chatbot_floating_viber')) {
2060 update_option('enable_wp_chatbot_floating_viber', '');
2061 }
2062 if(!get_option('qlcd_wp_chatbot_viber_acc')) {
2063 update_option('qlcd_wp_chatbot_viber_acc', '');
2064 }
2065 //Integration others
2066 if(!get_option('enable_wp_chatbot_floating_phone')) {
2067 update_option('enable_wp_chatbot_floating_phone', '');
2068 }
2069 if(!get_option('qlcd_wp_chatbot_phone')) {
2070 update_option('qlcd_wp_chatbot_phone', '');
2071 }
2072 if(!get_option('enable_wp_chatbot_floating_link')) {
2073 update_option('enable_wp_chatbot_floating_link', '');
2074 }
2075
2076 if(!get_option('qlcd_wp_chatbot_weblink')) {
2077 update_option('qlcd_wp_chatbot_weblink', '');
2078 }
2079 //Re-Tagetting
2080 if(!get_option('qlcd_wp_chatbot_ret_greet')) {
2081 update_option('qlcd_wp_chatbot_ret_greet', 'Hello');
2082 }
2083 if(!get_option('enable_wp_chatbot_exit_intent')) {
2084 update_option('enable_wp_chatbot_exit_intent', '');
2085 }
2086 if(!get_option('wp_chatbot_exit_intent_msg')) {
2087 update_option('wp_chatbot_exit_intent_msg', 'WAIT, WE HAVE A SPECIAL OFFER FOR YOU! Get Your 50% Discount Now. Use Coupon Code QC50 during checkout.');
2088 }
2089 if(!get_option('wp_chatbot_exit_intent_once')) {
2090 update_option('wp_chatbot_exit_intent_once', '');
2091 }
2092
2093 if(!get_option('enable_wp_chatbot_scroll_open')) {
2094 update_option('enable_wp_chatbot_scroll_open', '');
2095 }
2096 if(!get_option('wp_chatbot_scroll_open_msg')) {
2097 update_option('wp_chatbot_scroll_open_msg', 'WE HAVE A VERY SPECIAL OFFER FOR YOU! Get Your 50% Discount Now. Use Coupon Code QC50 during checkout.');
2098 }
2099 if(!get_option('wp_chatbot_scroll_percent')) {
2100 update_option('wp_chatbot_scroll_percent', 50);
2101 }
2102 if(!get_option('wp_chatbot_scroll_once')) {
2103 update_option('wp_chatbot_scroll_once', '');
2104 }
2105
2106 if(!get_option('enable_wp_chatbot_auto_open')) {
2107 update_option('enable_wp_chatbot_auto_open', '');
2108 }
2109
2110 if(!get_option('enable_wp_chatbot_ret_sound')) {
2111 update_option('enable_wp_chatbot_ret_sound', '');
2112 }
2113 if(!get_option('enable_wp_chatbot_sound_initial')) {
2114 update_option('enable_wp_chatbot_sound_initial', '');
2115 }
2116
2117
2118 if(!get_option('wp_chatbot_auto_open_msg')) {
2119 update_option('wp_chatbot_auto_open_msg', 'A SPECIAL OFFER FOR YOU! Get Your 50% Discount Now. Use Coupon Code QC50 during checkout.');
2120 }
2121 if(!get_option('wp_chatbot_auto_open_time')) {
2122 update_option('wp_chatbot_auto_open_time', 10);
2123 }
2124 if(!get_option('wp_chatbot_auto_open_once')) {
2125 update_option('wp_chatbot_auto_open_once', '');
2126 }
2127 if(!get_option('wp_chatbot_inactive_once')) {
2128 update_option('wp_chatbot_inactive_once', '');
2129 }
2130
2131 //To complete checkout.
2132 if(!get_option('enable_wp_chatbot_ret_user_show')) {
2133 update_option('enable_wp_chatbot_ret_user_show', '');
2134 }
2135 if(!get_option('wp_chatbot_auto_open_msg')) {
2136 update_option('wp_chatbot_checkout_msg', 'You have products in shopping cart, please complete your order.');
2137 }
2138 if(!get_option('wp_chatbot_inactive_time')) {
2139 update_option('wp_chatbot_inactive_time', 300);
2140 }
2141 if(!get_option('enable_wp_chatbot_inactive_time_show')) {
2142 update_option('enable_wp_chatbot_inactive_time_show', '');
2143 }
2144
2145 if(!get_option('wp_chatbot_proactive_bg_color')) {
2146 update_option('wp_chatbot_proactive_bg_color', '#ffffff');
2147 }
2148 if(!get_option('disable_wp_chatbot_feedback')) {
2149 update_option('disable_wp_chatbot_feedback','');
2150 }
2151 if(!get_option('disable_wp_chatbot_faq')) {
2152 update_option('disable_wp_chatbot_faq','');
2153 }
2154 if(!get_option('qlcd_wp_chatbot_feedback_label')) {
2155 update_option('qlcd_wp_chatbot_feedback_label',serialize(array('Send Feedback')));
2156 }
2157
2158 if(!get_option('enable_wp_chatbot_meta_title')) {
2159 update_option('enable_wp_chatbot_meta_title','');
2160 }
2161 if(!get_option('qlcd_wp_chatbot_meta_label')) {
2162 update_option('qlcd_wp_chatbot_meta_label','*New Messages');
2163 }
2164
2165 if(!get_option('disable_wp_chatbot_call_gen')) {
2166 update_option('disable_wp_chatbot_call_gen', '');
2167 }
2168
2169 if(!get_option('disable_wp_chatbot_site_search')) {
2170 update_option('disable_wp_chatbot_site_search', '');
2171 }
2172 if(!get_option('disable_wp_chatbot_call_sup')) {
2173 update_option('disable_wp_chatbot_call_sup', '');
2174 }
2175
2176 if(!get_option('qlcd_wp_chatbot_phone_sent')) {
2177 update_option('qlcd_wp_chatbot_phone_sent', 'Thanks for your phone number. We will call you ASAP!');
2178 }
2179 if(!get_option('qlcd_wp_chatbot_phone_fail')) {
2180 update_option('qlcd_wp_chatbot_phone_fail', 'Sorry! I could not collect your phone number!');
2181 }
2182 if(!get_option('enable_wp_chatbot_opening_hour')) {
2183 update_option('enable_wp_chatbot_opening_hour', '');
2184 }
2185 if(!get_option('enable_wp_chatbot_opening_hour')) {
2186 update_option('wpwbot_hours', array());
2187 }
2188
2189 if(!get_option('enable_wp_chatbot_dailogflow')) {
2190 update_option('enable_wp_chatbot_dailogflow', '');
2191 }
2192 if(!get_option('qlcd_wp_chatbot_dialogflow_client_token')) {
2193 update_option('qlcd_wp_chatbot_dialogflow_client_token', '');
2194 }
2195 if(!get_option('qlcd_wp_chatbot_dialogflow_defualt_reply')) {
2196 update_option('qlcd_wp_chatbot_dialogflow_defualt_reply', 'Sorry, I did not understand you. You may browse');
2197 }
2198 if(!get_option('qlcd_wp_chatbot_dialogflow_agent_language')) {
2199 update_option('qlcd_wp_chatbot_dialogflow_agent_language', 'en');
2200 }
2201
2202 }
2203 /*
2204 * Reset Options will be insert as defualt data
2205 */
2206 add_action('wp_ajax_qcld_wb_chatboot_delete_all_options', 'qcld_wb_chatboot_delete_all_options');
2207 add_action('wp_ajax_nopriv_qcld_wb_chatboot_delete_all_options', 'qcld_wb_chatboot_delete_all_options');
2208 //Jarvis all option will be delete during uninstlling.
2209 function qcld_wb_chatboot_delete_all_options(){
2210 delete_option('disable_wp_chatbot');
2211 delete_option('disable_wp_chatbot_icon_animation');
2212 delete_option('disable_wp_chatbot_on_mobile');
2213 delete_option('qlcd_wp_chatbot_admin_email');
2214 delete_option('qlcd_wp_chatbot_from_email');
2215
2216 delete_option('disable_wp_chatbot_product_search');
2217 delete_option('disable_wp_chatbot_catalog');
2218 delete_option('disable_wp_chatbot_order_status');
2219 delete_option('disable_wp_chatbot_notification');
2220 delete_option('enable_wp_chatbot_rtl');
2221 delete_option('show_menu_after_greetings');
2222 delete_option('enable_chat_session');
2223
2224 delete_option('enable_wp_chatbot_mobile_full_screen');
2225 delete_option('wpbot_preloading_time');
2226 delete_option('disable_wp_chatbot_cart_item_number');
2227 delete_option('disable_wp_chatbot_featured_product');
2228 delete_option('disable_wp_chatbot_sale_product');
2229 delete_option('wp_chatbot_open_product_detail');
2230 delete_option('qlcd_wp_chatbot_product_orderby');
2231 delete_option('qlcd_wp_chatbot_product_order');
2232 delete_option('qlcd_wp_chatbot_ppp');
2233 delete_option('wp_chatbot_show_parent_category');
2234 delete_option('wp_chatbot_show_sub_category');
2235 delete_option('wp_chatbot_exclude_stock_out_product');
2236 delete_option('wp_chatbot_show_home_page');
2237 delete_option('qc_wpbot_menu_order');
2238
2239 delete_option('wp_chatbot_show_posts');
2240 delete_option('wp_chatbot_show_pages');
2241 delete_option('wp_chatbot_show_pages_list');
2242 delete_option('wp_chatbot_exclude_post_list');
2243 delete_option('wp_chatbot_show_wpcommerce');
2244 delete_option('qlcd_wp_chatbot_stop_words_name');
2245 delete_option('qlcd_wp_chatbot_stop_words');
2246 delete_option('qlcd_wp_chatbot_order_user');
2247 delete_option('wp_chatbot_icon');
2248 delete_option('wp_chatbot_floatingiconbg_color');
2249 delete_option('wp_chatbot_agent_image');
2250 delete_option('qcld_wb_chatbot_theme');
2251 delete_option('qcld_wb_chatbot_change_bg');
2252 delete_option('wp_chatbot_custom_css');
2253 delete_option('qlcd_wp_chatbot_host');
2254 delete_option('qlcd_wp_chatbot_agent');
2255 delete_option('qlcd_wp_chatbot_yes');
2256 delete_option('qlcd_wp_chatbot_no');
2257 delete_option('qlcd_wp_chatbot_or');
2258 delete_option('qlcd_wp_chatbot_sorry');
2259 delete_option('qlcd_wp_chatbot_agent_join');
2260 delete_option('qlcd_wp_chatbot_welcome');
2261 delete_option('qlcd_wp_chatbot_back_to_start');
2262 delete_option('qlcd_wp_chatbot_hi_there');
2263 delete_option('qlcd_wp_chatbot_welcome_back');
2264 delete_option('qlcd_wp_chatbot_asking_name');
2265 delete_option('qlcd_wp_chatbot_name_greeting');
2266 delete_option('qlcd_wp_chatbot_i_am');
2267 delete_option('qlcd_wp_chatbot_wildcard_msg');
2268 delete_option('qlcd_wp_chatbot_empty_filter_msg');
2269 delete_option('qlcd_wp_chatbot_did_you_mean');
2270 delete_option('qlcd_wp_chatbot_wildcard_product');
2271 delete_option('qlcd_wp_chatbot_wildcard_catalog');
2272 delete_option('qlcd_wp_chatbot_featured_products');
2273 delete_option('qlcd_wp_chatbot_sale_products');
2274 delete_option('qlcd_wp_chatbot_wildcard_support');
2275 delete_option('qlcd_wp_chatbot_messenger_label');
2276 delete_option('qlcd_wp_chatbot_product_success');
2277 delete_option('qlcd_wp_chatbot_product_fail');
2278 delete_option('qlcd_wp_chatbot_product_asking');
2279 delete_option('qlcd_wp_chatbot_product_suggest');
2280 delete_option('qlcd_wp_chatbot_product_infinite');
2281 delete_option('qlcd_wp_chatbot_load_more');
2282 delete_option('qlcd_wp_chatbot_wildcard_order');
2283 delete_option('qlcd_wp_chatbot_order_welcome');
2284 delete_option('qlcd_wp_chatbot_order_username_asking');
2285 delete_option('qlcd_wp_chatbot_order_username_password');
2286 delete_option('qlcd_wp_chatbot_support_welcome');
2287 delete_option('qlcd_wp_chatbot_support_email');
2288 delete_option('qlcd_wp_chatbot_asking_email');
2289 delete_option('qlcd_wp_chatbot_asking_msg');
2290 delete_option('qlcd_wp_chatbot_no_result');
2291 delete_option('qlcd_wp_chatbot_admin_email');
2292 delete_option('qlcd_wp_chatbot_email_sub');
2293 delete_option('qlcd_wp_site_search');
2294 delete_option('qlcd_wp_chatbot_email_sent');
2295 delete_option('qlcd_wp_chatbot_support_phone');
2296 delete_option('qlcd_wp_chatbot_asking_phone');
2297 delete_option('qlcd_wp_chatbot_thank_for_phone');
2298 delete_option('qlcd_wp_chatbot_sys_key_help');
2299 delete_option('qlcd_wp_chatbot_sys_key_product');
2300 delete_option('qlcd_wp_chatbot_sys_key_catalog');
2301 delete_option('qlcd_wp_chatbot_sys_key_order');
2302 delete_option('qlcd_wp_chatbot_sys_key_support');
2303 delete_option('qlcd_wp_chatbot_sys_key_reset');
2304 delete_option('qlcd_wp_chatbot_order_username_not_exist');
2305 delete_option('qlcd_wp_chatbot_order_username_thanks');
2306 delete_option('qlcd_wp_chatbot_order_password_incorrect');
2307 delete_option('qlcd_wp_chatbot_order_not_found');
2308 delete_option('qlcd_wp_chatbot_order_found');
2309 delete_option('qlcd_wp_chatbot_order_email_support');
2310 delete_option('qlcd_wp_chatbot_support_option_again');
2311 delete_option('qlcd_wp_chatbot_invalid_email');
2312 delete_option('qlcd_wp_chatbot_shopping_cart');
2313 delete_option('qlcd_wp_chatbot_add_to_cart');
2314 delete_option('qlcd_wp_chatbot_cart_link');
2315 delete_option('qlcd_wp_chatbot_checkout_link');
2316 delete_option('qlcd_wp_chatbot_cart_welcome');
2317 delete_option('qlcd_wp_chatbot_featured_product_welcome');
2318 delete_option('qlcd_wp_chatbot_viewed_product_welcome');
2319 delete_option('qlcd_wp_chatbot_latest_product_welcome');
2320 delete_option('qlcd_wp_chatbot_cart_title');
2321 delete_option('qlcd_wp_chatbot_cart_quantity');
2322 delete_option('qlcd_wp_chatbot_cart_price');
2323 delete_option('qlcd_wp_chatbot_no_cart_items');
2324 delete_option('qlcd_wp_chatbot_cart_updating');
2325 delete_option('qlcd_wp_chatbot_cart_removing');
2326 delete_option('qlcd_wp_chatbot_email_fail');
2327 delete_option('support_query');
2328 delete_option('support_ans');
2329 delete_option('qlcd_wp_chatbot_notification_interval');
2330 delete_option('qlcd_wp_chatbot_notifications');
2331 delete_option( 'qlcd_wp_chatbot_search_option');
2332 delete_option( 'wp_chatbot_index_count');
2333 delete_option( 'wp_chatbot_app_pages');
2334 //messenger option
2335 delete_option( 'enable_wp_chatbot_messenger');
2336 delete_option( 'enable_wp_chatbot_messenger_floating_icon');
2337 delete_option( 'qlcd_wp_chatbot_fb_app_id');
2338 delete_option( 'qlcd_wp_chatbot_fb_page_id');
2339 delete_option( 'qlcd_wp_chatbot_fb_color');
2340 delete_option( 'qlcd_wp_chatbot_fb_in_msg');
2341 delete_option( 'qlcd_wp_chatbot_fb_out_msg');
2342 //skype option
2343 delete_option( 'enable_wp_chatbot_skype_floating_icon');
2344 delete_option( 'enable_wp_chatbot_skype_id');
2345 //whats app
2346 delete_option( 'enable_wp_chatbot_whats');
2347 delete_option( 'qlcd_wp_chatbot_whats_label');
2348 delete_option( 'enable_wp_chatbot_floating_whats');
2349 delete_option( 'qlcd_wp_chatbot_whats_num');
2350 // Viber
2351 delete_option( 'enable_wp_chatbot_floating_viber');
2352 delete_option( 'qlcd_wp_chatbot_viber_acc');
2353 //Integration others
2354 delete_option( 'enable_wp_chatbot_floating_phone');
2355 delete_option( 'qlcd_wp_chatbot_phone');
2356 delete_option( 'enable_wp_chatbot_floating_link');
2357 delete_option( 'qlcd_wp_chatbot_weblink');
2358 //Re Targetting
2359 delete_option( 'qlcd_wp_chatbot_ret_greet');
2360 delete_option( 'enable_wp_chatbot_exit_intent');
2361 delete_option( 'wp_chatbot_exit_intent_msg');
2362 delete_option( 'wp_chatbot_exit_intent_once');
2363
2364 delete_option( 'enable_wp_chatbot_scroll_open');
2365 delete_option( 'wp_chatbot_scroll_open_msg');
2366 delete_option( 'wp_chatbot_scroll_percent');
2367 delete_option( 'wp_chatbot_scroll_once');
2368
2369 delete_option( 'enable_wp_chatbot_auto_open');
2370 delete_option( 'enable_wp_chatbot_ret_sound');
2371 delete_option( 'enable_wp_chatbot_sound_initial');
2372 delete_option( 'disable_wp_chatbot_feedback');
2373 delete_option( 'disable_wp_chatbot_faq');
2374 delete_option( 'qlcd_wp_chatbot_feedback_label');
2375 delete_option( 'enable_wp_chatbot_meta_title');
2376 delete_option( 'qlcd_wp_chatbot_meta_label');
2377 delete_option( 'wp_chatbot_auto_open_msg');
2378 delete_option( 'wp_chatbot_auto_open_time');
2379 delete_option( 'wp_chatbot_auto_open_once');
2380 delete_option( 'wp_chatbot_inactive_once');
2381 delete_option( 'wp_chatbot_proactive_bg_color');
2382 delete_option( 'qlcd_wp_chatbot_phone_sent');
2383 delete_option( 'qlcd_wp_chatbot_phone_fail');
2384 delete_option( 'disable_wp_chatbot_call_gen');
2385 delete_option( 'disable_wp_chatbot_site_search');
2386 delete_option( 'disable_wp_chatbot_call_sup');
2387
2388 delete_option( 'enable_wp_chatbot_ret_user_show');
2389 delete_option( 'enable_wp_chatbot_inactive_time_show');
2390 delete_option( 'wp_chatbot_inactive_time');
2391 delete_option( 'wp_chatbot_checkout_msg');
2392 delete_option( 'qlcd_wp_chatbot_shopper_demo_name');
2393 delete_option( 'qlcd_wp_chatbot_is_typing');
2394 delete_option( 'qlcd_wp_chatbot_send_a_msg');
2395 delete_option( 'qlcd_wp_chatbot_choose_option');
2396 delete_option( 'qlcd_wp_chatbot_viewed_products');
2397 delete_option( 'qlcd_wp_chatbot_help_welcome');
2398 delete_option( 'qlcd_wp_chatbot_help_msg');
2399 delete_option( 'qlcd_wp_chatbot_reset');
2400 delete_option( 'enable_wp_chatbot_opening_hour');
2401 delete_option( 'wpwbot_hours');
2402 delete_option( 'enable_wp_chatbot_dailogflow');
2403 delete_option( 'qlcd_wp_chatbot_dialogflow_client_token');
2404 delete_option( 'qlcd_wp_chatbot_dialogflow_defualt_reply');
2405 delete_option( 'qlcd_wp_chatbot_dialogflow_agent_language');
2406
2407 delete_option( 'qlcd_wp_chatbot_dialogflow_project_id');
2408 delete_option( 'wp_chatbot_df_api');
2409 delete_option( 'qlcd_wp_chatbot_dialogflow_project_key');
2410
2411 delete_option( 'wp_chatbot_bot_msg_bg_color');
2412 delete_option( 'wp_chatbot_bot_msg_text_color');
2413 delete_option( 'wp_chatbot_user_msg_bg_color');
2414 delete_option( 'wp_chatbot_user_msg_text_color');
2415 delete_option( 'wp_chatbot_buttons_bg_color');
2416 delete_option( 'wp_chatbot_buttons_text_color');
2417
2418 delete_option( 'wp_chatbot_buttons_bg_color_hover');
2419 delete_option( 'wp_chatbot_buttons_text_color_hover');
2420
2421 delete_option( 'wp_chatbot_theme_secondary_color');
2422 delete_option( 'wp_chatbot_theme_primary_color');
2423 delete_option( 'wp_chatbot_header_background_color');
2424 delete_option('wp_chatbot_font_size');
2425 delete_option('wp_chat_user_font_family');
2426 delete_option('wp_chat_bot_font_family');
2427 delete_option('wp_chatbot_bot_font');
2428 delete_option('wp_chatbot_user_font');
2429
2430 qcld_wb_chatboot_defualt_options();
2431 $html='Reset all options to default successfully.';
2432 wp_send_json($html);
2433 }
2434 /**
2435 *
2436 * Function to load translation files.
2437 *
2438 */
2439 function wp_chatbot_lang_init() {
2440 load_plugin_textdomain( 'wpchatbot', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
2441 }
2442 add_action( 'plugins_loaded', 'wp_chatbot_lang_init');
2443
2444 $wpbot_feedback = new Wp_Usage_Feedback(
2445 __FILE__,
2446 'plugins@quantumcloud.com',
2447 false,
2448 true
2449
2450 );
2451
2452 function wpbot_help_page_callback_func(){
2453 ?>
2454 <div class="wrap swpm-admin-menu-wrap">
2455 <h2></h2>
2456 <h2 class="nav-tab-wrapper sld_nav_container wppt_nav_container">
2457 <a class="nav-tab sld_click_handle nav-tab-active" href="#general_int">Getting Started</a>
2458
2459 <a class="nav-tab sld_click_handle" id="general_debuggings" href="#general_debugging">Troubleshooting & FAQ</a>
2460
2461 </h2>
2462
2463
2464 <!-- <div class="container wppt-settings-section" style="margin-right:unset;margin-left:unset; margin-top:40px" id="general_help">
2465 <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff">
2466 <h3 style="font-size:20px;margin-top: 10px;">Check out the Pro version of the Plugin for more features from <a href="https://www.quantumcloud.com/products/chatbot-for-wordpress/" target="_blank">here</a>.</h3>
2467 </div>
2468 </div>-->
2469
2470
2471
2472 <div class="container wppt-settings-section" style="margin-right:unset;margin-left:unset; display:block; margin-top:40px" id="general_int">
2473 <div class="content form-container qcbot_help_secion" style="">
2474 <!-- new Section -->
2475
2476 <h2 style="margin-top: 10px;color:#fff">WPBot Interactions</h2>
2477 <h3 style="color:#fff">You can create user interactions in the following ways:</h3>
2478 <div style="clear:both"></div>
2479 <div class="panel panel-default">
2480 <div class="panel-heading" role="tab" id="headingOne">
2481 <h4 class="panel-title">
2482 <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="false" aria-controls="collapseOne"> Predefined intents - Built-in ChatBot Features </a>
2483 </h4>
2484 </div>
2485 <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
2486 <div class="panel-body"> Predefined intents can work without integration to DialogFlow API and AI. These are readily available as soon as you install the plugin and can be turned on or off individually. <div class="section-container">
2487 <div class="wpb_column vc_column_container vc_col-sm-6">
2488 <div class="vc_column-inner ">
2489 <div class="wpb_wrapper">
2490 <div class="to-icon-box left txt-left">
2491 <div class="to-icon-txt fa-4x-txt ">
2492 <h3>
2493 <span>// </span>Simple Text Responses
2494 </h3>
2495 <p>Create unlimited text responses from your WordPress backend. The ChatBot uses advanced search algorithm for natural language phrase matching with user input. </p>
2496 </div>
2497 </div>
2498 <div class="to-icon-box left txt-left">
2499 <div class="to-icon-txt fa-4x-txt ">
2500 <h3>
2501 <span>// </span>Send eMail, Call Me Back &amp; Feedback Collection
2502 </h3>
2503 <p>Users can send a email to the site admin directly from the Chat window for customer support. The Call Me Back feature lets you get call requests from your customers which will be emailed to you. You can also use WPBot to collect Feedback from your customers regarding anything! You can disable/enable these features from the Start Menu. </p>
2504 </div>
2505 </div>
2506 <div class="to-icon-box left txt-left">
2507 <div class="to-icon-txt fa-4x-txt ">
2508 <h3>
2509 <span>// </span>Advanced Site Search <span class="qc_wpbot_pro">PRO</span>
2510 </h3>
2511 <p>If no matching text response is found WPBot will conduct an advanced website search and try to match user queries with your website contents and show results. </p>
2512 </div>
2513 </div>
2514 </div>
2515 </div>
2516 </div>
2517 <div class="wpb_column vc_column_container vc_col-sm-6">
2518 <div class="vc_column-inner ">
2519 <div class="wpb_wrapper">
2520 <div class="to-icon-box left txt-left">
2521 <div class="to-icon-txt fa-4x-txt ">
2522 <h3>
2523 <span>// </span>Frequently Asked Questions
2524 </h3>
2525 <p>Create a set of Frequently Asked Questions or FAQ so users can quickly find answers to the most common questions they have.</p>
2526 </div>
2527 </div>
2528 <div class="to-icon-box left txt-left">
2529 <div class="to-icon-txt fa-4x-txt ">
2530 <h3>
2531 <span>// </span>Ask for name, email, phone number etc.
2532 </h3>
2533 <p>Asking for the name is the default workflow. In the pro version, you can also ask for an email and phone number if you want to or skip the Greetings part altogether and load any intent of your choice.</p>
2534 </div>
2535 </div>
2536 <div class="to-icon-box left txt-left">
2537 <div class="to-icon-txt fa-4x-txt ">
2538 <h3>
2539 <span>// </span>Newsletter Subscription <span class="qc_wpbot_pro">PRO</span>
2540 </h3>
2541 <p>WPBot can prompt User for eMail subscription. Link this with your Retargeting ChatBot window popup and a special offer. People can register their email address that you can later export as CSV! <strong>GDPR compliant</strong> with unsubscribe option from the ChatBot! </p>
2542 </div>
2543 </div>
2544 </div>
2545 </div>
2546 </div>
2547 </div>
2548 </div>
2549 </div>
2550 </div>
2551 <div class="panel panel-default">
2552 <div class="panel-heading" role="tab" id="headingTwo">
2553 <h4 class="panel-title">
2554 <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> Menu Driven - Created with Conversational Form Builder Addon </a>
2555 </h4>
2556 </div>
2557 <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
2558 <div class="panel-body">
2559 <p>Extend the Start Menu with the <strong>powerful Conversational Forms</strong>&nbsp; Addon for WPBot. It extends WPBot’s functionality and adds the ability to create <strong>conditional conversations</strong> and/or <strong>forms</strong> for the WPBot. It is a visual, <strong> drag and drop</strong> form builder that is easy to use and very flexible. Supports conditional logic and use of variables to build all types of forms or just <strong>menu driven</strong>
2560 <strong>conversations </strong>with if else logic <strong>. </strong>Conversations or forms can be <strong>eMailed</strong> to you and <strong>saved in the database</strong>.
2561 </p>
2562 <h4>Conversational Form Builder Free or Pro version works with the WPBot Free or Pro versions.</h4>
2563 <a class="FormBuilder" href="https://wordpress.org/plugins/conversational-forms/" target="_blank">Download Free Version</a>
2564 <a class="FormBuilder" href="https://www.quantumcloud.com/products/chatbot-addons/" target="_blank">Grab the Pro version</a>
2565 <h4>What Can You Do with it?</h4>
2566 <p>Conversation Forms allows you to create a wide variety of forms, that might include:</p>
2567 <ul>
2568 <li>Create menu or button driven conversations</li>
2569 <li>Conditional <strong>Menu Driven Conversations</strong>
2570 <span class="qc_wpbot_pro" style="font-size: 9px;">PRO</span>
2571 </li>
2572 <li>Standard Contact Forms</li>
2573 <li>Dynamic, <strong>conditional Forms</strong> – where fields can change based on the user selections <span class="qc_wpbot_pro" style="font-size: 9px;">PRO</span>
2574 </li>
2575 <li>Job <strong>Application Forms</strong>
2576 </li>
2577 <li>
2578 <strong>Lead Capture</strong> Forms
2579 </li>
2580 <li>Various types of <strong>Calculators</strong>
2581 <span class="qc_wpbot_pro" style="font-size: 9px;">PRO</span>
2582 </li>
2583 <li>Feedback <strong>Survey</strong> Forms etc. </li>
2584 </ul>
2585 </div>
2586 </div>
2587 </div>
2588 <div class="panel panel-default">
2589 <div class="panel-heading" role="tab" id="headingThree">
2590 <h4 class="panel-title">
2591 <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> DialogFlow ES and CX </a>
2592 </h4>
2593 </div>
2594 <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
2595 <div class="panel-body">
2596 <div class="section-container">
2597 <div class="wpb_column vc_column_container vc_col-sm-6">
2598 <div class="wpb_wrapper">
2599 <h2 style="font-size: 20px;">DialogFlow Essential</h2> Intents created in Dialogflow give you the power to build a truly human like, intelligent and comprehensive chatbot. Build any type of Intents and Responses (including rich message responses) directly in DialogFlow and train the bot accordingly. When you create custom intents and responses in DialogFlow, WPBot will <strong>automatically</strong> display them when user inputs match with your Custom Intents along with the responses you created. You can also build Rich responses by enabling Facebook messenger Response option. <p></p>
2600 <p style="text-align: left;">In addition you can also Enable <strong>Advanced Chained Question and Answers</strong> using follow up Intents, Contexts, Entities etc. and then have resulting answers from your users emailed to you. This feature lets you create a a series of questions in DialogFlow that will be asked by the bot and based on the user inputs a response will be displayed. <span class="qc_wpbot_pro" style="font-size: 9px;">PRO</span>
2601 </p>
2602 <p style="text-align: left;">WPBot also supports Rich responses using Facebook Messenger integration. This allows you to display Image, <strong>Cards</strong>, Quick Text Reply or Custom PayLoad inside the ChatBot window. You can also insert an <strong>image</strong> or <strong>youtube video</strong> link inside the DialogFlow responses and they will be automatically rendered by the WPBot! <span class="qc_wpbot_pro" style="font-size: 9px;">PRO</span>
2603 </p>
2604 </div>
2605 </div>
2606 <div class="wpb_column vc_column_container vc_col-sm-6">
2607 <div class="wpb_wrapper">
2608 <h2 style="font-size: 20px;">DialogFlow CX <span class="qc_wpbot_pro">PRO</span>
2609 </h2>
2610 <p>WPBot supports <strong>visual workflow builder</strong> Dialogflow CX. It provides a new way of designing agents, taking a state machine approach to agent design. This gives you clear and explicit control over a conversation, a better end-user experience, and a better development <strong>workflow</strong>. </p>
2611 <ul>
2612 <li>
2613 <strong>Console visualization</strong>: A new <strong>visual builder</strong> makes building and maintaining agents easier. Conversation paths are graphed as a state machine model, which makes conversations easier to design, enhance, and maintain.
2614 </li>
2615 <li>
2616 <strong>Intuitive and powerful conversation control</strong>: Conversation states and state transitions are first-class types that provide explicit and powerful control over conversation paths. You can clearly define a series of steps that you want the end-user to go through.
2617 </li>
2618 <li>
2619 <strong>Flows for agent partitions</strong>: With flows, you can partition your agent into smaller conversation topics. Different team members can own different flows, which makes large and complex agents easy to build.
2620 </li>
2621 <img style="width:100%" src="<?php echo QCLD_wpCHATBOT_IMG_URL . '/dialogflow-cx-1024x676.jpg';?>" alt="Dialogflow CX">
2622 </ul>
2623 </div>
2624 </div>
2625 </div>
2626 </div>
2627 </div>
2628 </div>
2629
2630
2631 <!-- end new Section -->
2632
2633 </div>
2634 </div>
2635
2636
2637
2638
2639
2640
2641
2642
2643 <div class="container wppt-settings-section" style="margin-right:unset;margin-left:unset;display:none" id="general_debugging">
2644
2645
2646
2647 <div class="content form-container qcbot_help_secion" style="margin-right:unset;margin-left:unset; margin-top:40px" >
2648 <div class="" style="color:#fff">
2649 <h2 style="font-size:28px;margin-top: 10px;">Tips</h2>
2650 <h2 style="font-size:20px;margin-top: 10px;">Tutorial</h2>
2651 <p>You will find some helpful video tutorials and the ChatBot workflow on this <a href="https://dev.quantumcloud.com/wpbot-pro/chatbot-workflow/" target="_blank">page</a>.</p>
2652 <h2 style="font-size:20px">Simple Text Responses</h2>
2653 <p>Create simple text responses easily for your chatbot. The ChatBot will use advanced search algorithm for natural language phrase matching with user input. You can also adjust the Phrase matching accuracy for better user experience.</p>
2654 <h2 style="font-size:20px">Setting Updates</h2>
2655 <p>After making changes in the language center or settings, please type reset and hit enter in the ChatBot to start testing from the beginning or open a new Incognito window (Ctrl+Shit+N in chrome).</p>
2656 <h2 style="font-size:20px">Note</h2>
2657 <p>You could use &lt;br&gt; tag in Language Center & Dialogflow Responses for line break.</p>
2658 </div>
2659 </div>
2660
2661
2662
2663 <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;margin-top:0px">
2664 <h2 style="font-size:20px">Problem: I changed language and/or some settings but do not see the changes.</h2>
2665 <p>WPBot saves a lot of information in the browser's local storage. After making any language or settings change you must clear browser cache and cookies both and reload the page for testing. An easier alternative is to always launch a new browser window in Incognito mode (Ctrl+Shift+N in chrome) and test there. Also, you need to purge cache plugin and CDN caching if you have any.</p>
2666 </div>
2667 <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2668 <h2 style="font-size:20px">Problem: I cannot connect to the DialogFlow</h2>
2669 <p>To Debug: 1. Make sure that you have created the Google Project and the Service account as an Owner<br>
2670 2. Make sure that you have connected to the correct Dialogflow agent<br>
2671 3. Follow the steps in this tutorial correctly: <a href="https://dev.quantumcloud.com/wpbot-pro-demo/dialogflow-integration/" target="_blank">https://dev.quantumcloud.com/wpbot-pro-demo/dialogflow-integration/</a><br>
2672 4. Make sure that the Google Client Package is Installed on Your Website.<br>
2673 5. Make sure to download and import the sample DialogFlow agent to your agent<br>
2674 6. Test the ChatBot in the browser Incognito mode</p>
2675 </div>
2676 <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2677 <h2 style="font-size:20px">Problem: I am not getting emails from the ChatBot</h2>
2678 <p>The WPBot ChatBot uses the WordPress' default email function. If you are not getting emails from the ChatBot's email feature, it is likely that no emails are getting through from your WordPress site or they are ending up in the Spam box. Try using an SMTP mailer plugin. Also, try changing the to and from email addresses in the ChatBot's general settings area.</p>
2679 </div>
2680 <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2681 <h2 style="font-size:20px">Problem: Simple text responses are not working or getting an error</h2>
2682 <p>WPBot requires mysql version 5.6+ for the simple text responses to work. If your server has a version below that, you might see some PHP error or the Simple Text Responses will not work at all. Please request your hosting support to update the mysql version on your server.</p>
2683 </div>
2684 <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2685 <h2 style="font-size:20px">Problem: I changed language or some other settings but do not see them when testing</h2>
2686 <p>Please clear the browser cache and <strong>cookies</strong> to see any change you have made. Alternatively, you can open a fresh browser window in incognito mode (Ctrl+Shift+N in chrome) to test your changes. Also, you may need to purge any cache plugin and CDN caching.</p>
2687 </div>
2688 <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2689 <h2 style="font-size:20px">Problem: The ChatBot is NOT working in the front end.</h2>
2690 <p>The most common reason for this is if the theme is coded incorrectly and jQuery is loaded from external source. jQuery is included with WordPress core and according to WordPress standard, jQuery must be included using wp_enqueue_script. <a href="https://developer.wordpress.org/reference/functions/wp_enqueue_script/" target="_blank">https://developer.wordpress.org/reference/functions/wp_enqueue_script/</a> . Please make sure if that is the case in your theme.<br>
2691 Also go to Simple Text Responses and press the Re-Index button.</br>
2692 After that try purging any cache and test the chatbot in Incognito mode<br>
2693 Please contact us if you need [further help](<a href="https://www.quantumcloud.com/resources/free-support/" target="_blank">https://www.quantumcloud.com/resources/free-support/</a>). We take all user feedback sriously. </p>
2694 </div>
2695 <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2696 <h2 style="font-size:20px">Problem: The ChatBot is stuck on typing or loading</h2>
2697 <p>This usually happens if you enabled DialogFlow but did not complete the set up. Please make sure that you have carefully followed all the steps for DialogFlow integration in the Settings->DialogFlow section.<br>
2698 This can also happen if there is any empty language fields or Simple Text Responses database needs updating because of mysql version changes. Try saving both the Language Center and Simple Text Responses and test again.<br>
2699 Also go to Simple Text Responses and press the Re-Index button.</br>
2700 After that remember to test in a browser Incognito mode to avoid cache and cookies. </p>
2701 </div>
2702 <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2703 <h2 style="font-size:20px">Problem: How do I add new conversations to the ChatBot?</h2>
2704 <p>Please check the plugin's Help Section for details on this</p>
2705 </div>
2706 <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2707 <h2 style="font-size:20px">Problem: How do I add Line Breaks?</h2>
2708 <p>Please use the &lt;br&gt; tag for line breaks.</p>
2709 </div>
2710 <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2711 <h2 style="font-size:20px">Problem: Are HTML tags supported? </h2>
2712 <p>Yes, common HTML tags link link href, strong, br etc. are supported.</p>
2713 </div>
2714 <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2715 <h2 style="font-size:20px">Problem: I want to add images, GIFs, Videos</h2>
2716 <p>Images, GIFs and Youtube Videos are supprted in the pro version. Pro version also includes a handy giphy floating search feature for easy embed in the language center.</p>
2717 </div>
2718
2719
2720 <div class="content form-container qcbot_help_secion" style="padding: 10px;color:#fff;">
2721 <h2 style="font-size:20px">How to disable Predefined Intent?</h2>
2722 <p>You can disable predefined intents FAQ, eMail, Call me from WPBot Lite > Settings page's Start Menu Section.</p>
2723 </div>
2724
2725
2726 </div>
2727
2728 </div>
2729 <script type="text/javascript">
2730 jQuery(document).ready(function($){
2731 var url=document.URL;
2732 var arr=url.split('#');
2733 var tab_tar = '.'+arr[1];
2734 setTimeout(function(){
2735 jQuery(tab_tar).trigger('click');
2736 }, 500);
2737
2738 jQuery('.wppt_nav_container .nav-tab').on('click', function(e){
2739 e.preventDefault();
2740 var section_id = jQuery(this).attr('href');
2741 jQuery('.wppt_nav_container .nav-tab').removeClass('nav-tab-active');
2742 jQuery(this).addClass('nav-tab-active');
2743 jQuery('.wppt-settings-section').hide();
2744 jQuery('.wppt-settings-section').each(function(){
2745 jQuery(section_id).show();
2746 });
2747 });
2748 })
2749 </script>
2750 <?php
2751 }
2752
2753 add_action('init', 'qc_wp_latest_update_check');
2754 function qc_wp_latest_update_check(){
2755 global $wpdb;
2756 if(!get_option('qc_wp_ludate_ck')){
2757 update_option('qlcd_wp_chatbot_support_phone', 'Leave your number. We will call you back!');
2758 update_option('qlcd_wp_chatbot_support_email', 'Send us Email');
2759 update_option('qlcd_wp_chatbot_wildcard_support', 'FAQ');
2760 update_option('qc_wp_ludate_ck', 'done');
2761 }
2762
2763 if( ! get_option( 'wpbot-admin-notice-oninstallation' ) ){
2764 update_option('wpbot-admin-notice-oninstallation', 'show');
2765 }
2766
2767 if(!get_option('qc_wpb_simple_response_db_upgrade_free2')){
2768
2769 $collate = '';
2770 if ( $wpdb->has_cap( 'collation' ) ) {
2771
2772 if ( ! empty( $wpdb->charset ) ) {
2773
2774 $collate .= "DEFAULT CHARACTER SET $wpdb->charset";
2775 }
2776 if ( ! empty( $wpdb->collate ) ) {
2777
2778 $collate .= " COLLATE $wpdb->collate";
2779
2780 }
2781 }
2782 //Bot Response Table
2783 $table1 = $wpdb->prefix.'wpbot_response';
2784 $sql_sliders_Table1 = "
2785 CREATE TABLE IF NOT EXISTS `$table1` (
2786 `id` INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
2787 `query` TEXT NOT NULL,
2788 `keyword` TEXT NOT NULL,
2789 `response` TEXT NOT NULL,
2790 `category` varchar(256) NOT NULL,
2791 `intent` varchar(256) NOT NULL,
2792 `custom` varchar(256) NOT NULL,
2793 FULLTEXT(`query`, `keyword`, `response`)
2794 ) $collate AUTO_INCREMENT=1 ENGINE=InnoDB";
2795
2796 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
2797 dbDelta( $sql_sliders_Table1 );
2798
2799 if(!get_option('qlcd_wp_chatbot_did_you_mean')) {
2800 update_option('qlcd_wp_chatbot_did_you_mean', serialize(array('Did you mean?')));
2801 }
2802
2803 if(!get_option('qlcd_wp_chatbot_did_you_mean')) {
2804 update_option('qlcd_wp_chatbot_did_you_mean', serialize(array('Did you mean?')));
2805 }
2806
2807 $sqlqry = $wpdb->get_results("select * from $table1");
2808 if(empty($sqlqry)){
2809
2810 $query = 'What Can WPBot do for you?';
2811 $response = 'WPBot can converse fluidly with users on website and FB messenger. It can search your website, send/collect eMails, user feedback & phone numbers . You can create Custom Intents from DialogFlow with Rich Messages & Card responses!';
2812
2813 $data = array('query' => $query, 'keyword' => '', 'response'=> $response, 'intent'=> '');
2814 $format = array('%s','%s', '%s', '%s');
2815 $wpdb->insert($table1,$data,$format);
2816 }
2817
2818 update_option('qc_wpb_simple_response_db_upgrade_free2', 'done');
2819
2820 }
2821
2822 if(!get_option('qc_wp_db_engine_update_free')){
2823 $table1 = $wpdb->prefix.'wpbot_response';
2824 $wpdb->query("ALTER TABLE $table1 ENGINE = InnoDB");
2825
2826 update_option('qc_wp_db_engine_update_free', 'done');
2827 }
2828 if(!get_option('qc_wp_db_engine_update_free_unassign')){
2829 $table1 = $wpdb->prefix.'wpbot_response';
2830 $wpdb->query("ALTER TABLE $table1 CHANGE `id` `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT;");
2831 update_option('qc_wp_db_engine_update_free_unassign', 'done');
2832 }
2833
2834 if(isset($_POST['qc_bot_str_query']) && $_POST['qc_bot_str_query']!='' && !class_exists('Qcld_str_pro')){
2835
2836 $query = wp_unslash(sanitize_text_field($_POST['qc_bot_str_query']));
2837 $keyword = wp_unslash(sanitize_text_field($_POST['qc_bot_str_keyword']));
2838 $intent = wp_unslash(sanitize_text_field($_POST['qc_bot_str_intent']));
2839
2840 $category = '';
2841
2842 $response = wp_kses(wp_unslash($_POST['qc_bot_str_response']), 'post');
2843
2844 $table = $wpdb->prefix.'wpbot_response';
2845 $data = array('query' => $query, 'keyword' => $keyword, 'response'=> $response, 'intent'=> $intent, 'category'=> $category);
2846 $format = array('%s','%s', '%s', '%s', '%s');
2847
2848 if(isset($_POST['qc_bot_str_id']) && $_POST['qc_bot_str_id']!=''){
2849 $id = sanitize_text_field($_POST['qc_bot_str_id']);
2850 $where = array('id'=>$id);
2851 $whereformat = array('%d');
2852 $wpdb->update( $table, $data, $where, $format, $whereformat );
2853 }else{
2854 $wpdb->insert($table,$data,$format);
2855 }
2856
2857 qc_mysql_remove_existing_indexes();
2858 $wpdb->query("ALTER TABLE $table ADD FULLTEXT(`query`, `keyword`, `response`)");
2859
2860 wp_redirect(admin_url('admin.php?page=simple-text-response'));exit;
2861
2862 }
2863 $table = $wpdb->prefix.'wpbot_response';
2864 if(isset($_POST['qc-re-index'])){
2865 qc_mysql_remove_existing_indexes();
2866 $wpdb->query("ALTER TABLE $table ADD FULLTEXT(`query`, `keyword`)");
2867 add_action('admin_notices', 'general_admin_notice_str' );
2868 }
2869 if(isset($_POST['qc_bot_str_weight']) && $_POST['qc_bot_str_weight']!=''){
2870 $weight = sanitize_text_field($_POST['qc_bot_str_weight']);
2871 update_option('qc_bot_str_weight', $weight);
2872 }
2873 if(isset($_POST['qc_bot_str_remove_stopwords']) && $_POST['qc_bot_str_remove_stopwords']!=''){
2874 $stopwords = sanitize_text_field($_POST['qc_bot_str_remove_stopwords']);
2875 update_option('qc_bot_str_remove_stopwords', $stopwords);
2876 }
2877 if(isset($_POST['qc_bot_str_fields']) && !empty($_POST['qc_bot_str_fields'])){
2878
2879 $table = $wpdb->prefix.'wpbot_response';
2880 $fields = ($_POST['qc_bot_str_fields']);
2881 qc_mysql_remove_existing_indexes();
2882
2883 if($fields && !empty($fields)){
2884 $wpdb->query("ALTER TABLE $table ADD FULLTEXT(".implode(', ', $fields).")");
2885 }
2886 update_option('qc_bot_str_fields', $fields);
2887 }
2888
2889 if(!get_option('wpbot_preloading_time')) {
2890 update_option('wpbot_preloading_time', '0.5');
2891 }
2892
2893 }
2894
2895 function general_admin_notice_str(){
2896 if ( isset($_GET['page']) && $_GET['page'] == 'simple-text-response' ) {
2897 echo '<div class="notice notice-success is-dismissible">
2898 <p>Re-Indexing has been completed!</p>
2899 </div>';
2900 }
2901 }
2902
2903 function qc_wpbot_simple_response_intent(){
2904 global $wpdb;
2905 $table = $wpdb->prefix.'wpbot_response';
2906 $results = $wpdb->get_results("SELECT `intent` FROM `$table` WHERE 1 and `intent` !=''");
2907 $response = array();
2908 if(!empty($results)){
2909 foreach($results as $result){
2910 $response[] = $result->intent;
2911 }
2912 }
2913 return $response;
2914 }
2915
2916 function qc_mysql_remove_existing_indexes(){
2917 global $wpdb;
2918 $table = $wpdb->prefix.'wpbot_response';
2919
2920 $results = $wpdb->get_results("SHOW INDEX FROM $table");
2921 $indexes = array();
2922 foreach($results as $result){
2923
2924
2925
2926 if("PRIMARY" != $result->Key_name && !in_array($result->Key_name, $indexes)){
2927 $wpdb->query("ALTER TABLE $table DROP INDEX `".$result->Key_name
2928 ."`;");
2929 $indexes[] = $result->Key_name;
2930 }
2931
2932 }
2933 }
2934
2935 add_action( 'activated_plugin', 'qc_wpbotfree_activation_redirect' );
2936 function qc_wpbotfree_activation_redirect( $plugin ){
2937
2938 if( $plugin == plugin_basename( __FILE__ ) ) {
2939 exit( wp_redirect( admin_url('admin.php?page=wpbot_help_page') ) );
2940 }
2941 }
2942
2943
2944
2945
2946