diff --git a/README.md b/README.md index 02c31654e..309605a23 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ![ClassifAI](https://classifaiplugin.com/wp-content/themes/classifai-theme/assets/img/logo.svg "ClassifAI") +# ![ClassifAI](https://classifaiplugin.com/wp-content/themes/fse-classifai-theme/assets/img/logo.svg "ClassifAI") > Supercharge WordPress Content Workflows and Engagement with Artificial Intelligence. diff --git a/includes/Classifai/Providers/Azure/ComputerVision.php b/includes/Classifai/Providers/Azure/ComputerVision.php index 1a947a4d1..a4b6246c7 100644 --- a/includes/Classifai/Providers/Azure/ComputerVision.php +++ b/includes/Classifai/Providers/Azure/ComputerVision.php @@ -206,6 +206,16 @@ public function sanitize_settings( array $new_settings ) { if ( is_wp_error( $auth_check ) ) { $new_settings[ static::ID ]['authenticated'] = false; + + $error_message = $auth_check->get_error_message(); + + // Add an error message. + add_settings_error( + 'api_key', + 'classifai-auth', + $error_message, + 'error' + ); } else { $new_settings[ static::ID ]['authenticated'] = true; } @@ -692,7 +702,7 @@ protected function authenticate_credentials( string $url, string $api_key ) { 'Ocp-Apim-Subscription-Key' => $api_key, 'Content-Type' => 'application/json', ], - 'body' => '{"url":"https://classifaiplugin.com/wp-content/themes/classifai-theme/assets/img/header.png"}', + 'body' => '{"url":"https://classifaiplugin.com/wp-content/themes/fse-classifai-theme/assets/img/header.png"}', ] );