wp plugin udapted v1.5.0
This commit is contained in:
@@ -360,21 +360,14 @@ if (!function_exists('igny8_is_connection_enabled')) {
|
||||
*/
|
||||
function igny8_get_connection_state() {
|
||||
$api_key = function_exists('igny8_get_secure_option') ? igny8_get_secure_option('igny8_api_key') : get_option('igny8_api_key');
|
||||
$integration_id = get_option('igny8_integration_id');
|
||||
$last_structure_sync = get_option('igny8_last_structure_sync');
|
||||
|
||||
if (empty($api_key)) {
|
||||
igny8_log_connection_state('not_connected', 'No API key found');
|
||||
return 'not_connected';
|
||||
}
|
||||
|
||||
if (!empty($api_key) && !empty($integration_id) && !empty($last_structure_sync)) {
|
||||
igny8_log_connection_state('connected', 'Fully connected and synced');
|
||||
return 'connected';
|
||||
}
|
||||
|
||||
igny8_log_connection_state('configured', 'API key set, pending structure sync');
|
||||
return 'configured';
|
||||
igny8_log_connection_state('connected', 'API key configured');
|
||||
return 'connected';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user