Skip to content

Commit

Permalink
Merge branch 'develop' into feature/azure-language-service
Browse files Browse the repository at this point in the history
  • Loading branch information
psorensen committed Aug 6, 2024
2 parents b550389 + afda726 commit db07de9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
12 changes: 11 additions & 1 deletion includes/Classifai/Providers/Azure/ComputerVision.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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"}',
]
);

Expand Down

0 comments on commit db07de9

Please sign in to comment.