← All changes
|
includes/extensions/AI_SEO_Tools/Bulk_Alt_Text_Module.php
+1
-1
51.1.76
→
51.1.83
View file →
| @@ -42,9 +42,9 @@ | ||
| 42 | 42 | wp_send_json_error(['message' => esc_html__('Permission denied.', 'king-addons')], 403); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | $ka_ai_opts = get_option('king_addons_ai_options', []); |
| 46 | - if (empty($ka_ai_opts['openai_api_key'])) { | |
| 46 | + if ('' === \King_Addons\AI_Provider::getApiKey()) { | |
| 47 | 47 | wp_send_json_error(['message' => esc_html__('OpenAI API key is not set. Please add it in AI Settings.', 'king-addons'), 'code' => 'no_api_key'], 400); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | $limit = isset($_POST['limit']) ? absint($_POST['limit']) : 0; |