PluginProbe
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent / 2.3.1
SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent v2.3.1
3.5.4 3.5.3 3.5.2 3.5.1 3.4.9 3.5.0 3.4.8 3.4.7 trunk 2.3.1 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6
supportcandy / includes / admin / db_upgrade / db_upgrade.php

db_upgrade.php in SupportCandy – AI Customer Support Ticket System & Live Chatbot Agent 2.3.1, at includes/admin/db_upgrade/db_upgrade.php

85 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly
4 }
5
6 global $current_user;
7
8 /**
9 * Exit if logged in user do not have administrator capabilities
10 */
11 if( !$current_user->has_cap('manage_options') ) exit();
12
13 $installed_db_version = get_option( 'wpsc_db_version', 1 );
14
15 if( $installed_db_version < '2.0' ) {
16
17 $addons_compatibility = array();
18
19 if( class_exists('Support_Candy_SLA') && WPSC_SLA_VERSION < 2 )
20 $addons_compatibility[] = 'SupportCandy - SLA';
21
22 if( class_exists('WPSC_Conditional_Agent_Assign') && WPSC_CAA_VERSION < 2 )
23 $addons_compatibility[] = 'SupportCandy - Assign Agent Rules';
24
25 if( class_exists('Support_Candy_SF') && WPSC_SF_VERSION < 2 )
26 $addons_compatibility[] = 'SupportCandy - Satisfaction Survey';
27
28 if( class_exists('WPSC_Email_Piping') && WPSC_EP_VERSION < 2 )
29 $addons_compatibility[] = 'SupportCandy - Email Piping';
30
31 if( class_exists('Support_Candy_ULT_FAQ') && WPSC_ULTFAQ_VERSION < 2 )
32 $addons_compatibility[] = 'SupportCandy - FAQ Integration';
33
34 if( class_exists('WPSC_Reports') && WPSC_RP_VERSION < 2 )
35 $addons_compatibility[] = 'SupportCandy - Reports';
36
37 if( class_exists('Support_Candy_PRASS_KB') && WPSC_PRASS_KB_VERSION < 2 )
38 $addons_compatibility[] = 'SupportCandy - Knowledgebase Integration';
39
40 if( class_exists('WPSupportCandyWoocommerce') && WPSC_WOO_VERSION < 2 )
41 $addons_compatibility[] = 'SupportCandy Woocommerce Add-On';
42
43 if( class_exists('WPSC_USERGROUP') && WPSC_USERGROUP_VERSION < 2 )
44 $addons_compatibility[] = 'SupportCandy - Usergroup';
45
46 if( class_exists('Support_Candy_ST') && WPSC_ST_VERSION < 2 )
47 $addons_compatibility[] = 'SupportCandy - Schedule Tickets';
48
49 if( class_exists('WPSC_Export_Ticket') && WPSC_EXP_VERSION < 2 )
50 $addons_compatibility[] = 'SupportCandy - Export Ticket';
51
52 if( class_exists('Support_Candy_ATC') && WPSC_ATC_VERSION < 2 )
53 $addons_compatibility[] = 'SupportCandy - Automatic Close Ticket';
54
55 if( class_exists('WPSC_AGENTGROUP') && WPSC_AGENTGROUP_VERSION < 2 )
56 $addons_compatibility[] = 'SupportCandy - Agentgroup';
57
58 if( $addons_compatibility ){
59
60 ?>
61 <div class="wpsc-iso">
62
63 <div class="row" style="margin-top:20px;">
64 <div id="wpsc_upgrade_dialog_container" class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2" style="background-color:#fff;text-align:center;padding-bottom:20px;">
65 <h3 >Add-On update Required</h3>
66 <p class="help-block" style="font-size:15px;text-align:left;">Please upgrade the following add-ons in order to make it compatible with SupportCandy v2.0</p>
67 <div style="text-align:left;">
68 <?php
69 echo '<ol><li>' . implode( '</li><li>', $addons_compatibility) . '</li></ol>';
70 ?>
71 </div>
72 </div>
73 </div>
74
75 </div>
76 <?php
77
78 } else {
79
80 include WPSC_ABSPATH.'includes/admin/db_upgrade/db_version2.php';
81
82 }
83
84 }
85