Plugin Directory

Changeset 3110840


Ignore:
Timestamp:
07/02/2024 05:26:38 AM (21 months ago)
Author:
jetaver
Message:

Updating functions.php file in tags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ai24-assistant-integrator/tags/1.0.8/includes/functions.php

    r3110818 r3110840  
    3131    function AI24AI_get_api_key_by_identifier($identifier) {
    3232        $apiKeys = get_option('AI24AI_api_keys');
     33        error_log('Retrieved API Keys: ' . print_r($apiKeys, true)); // Debug log for API keys
     34
    3335        if (is_array($apiKeys)) {
    34             foreach ($details as $details) {
     36            foreach ($apiKeys as $details) {
     37                error_log('Checking API key: ' . print_r($details, true)); // Debug log for each key
    3538                if ($details['name'] === $identifier) {
     39                    error_log('API key found for identifier: ' . $identifier); // Log success
    3640                    return $details['key'];
    3741                }
    3842            }
    3943        }
     44        error_log('API key not found for identifier: ' . $identifier); // Log failure
    4045        return false;
    4146    }
Note: See TracChangeset for help on using the changeset viewer.