Commit 5b2a414 1 parent 4176ec4 commit 5b2a414 Copy full SHA for 5b2a414
File tree 2 files changed +4
-4
lines changed
includes/Classifai/Providers/Azure
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -155,13 +155,13 @@ public function sanitize_settings( array $new_settings ): array {
155
155
}
156
156
157
157
if ( ! empty ( $ settings_errors ) ) {
158
- $ registered_settings_errors = wp_list_pluck ( get_settings_errors ( $ this ->get_option_name () ), 'code ' );
158
+ $ registered_settings_errors = wp_list_pluck ( get_settings_errors ( $ this ->feature_instance -> get_option_name () ), 'code ' );
159
159
160
160
foreach ( $ settings_errors as $ code => $ message ) {
161
161
162
162
if ( ! in_array ( $ code , $ registered_settings_errors , true ) ) {
163
163
add_settings_error (
164
- $ this ->get_option_name (),
164
+ $ this ->feature_instance -> get_option_name (),
165
165
$ code ,
166
166
esc_html ( $ message ),
167
167
'error '
Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ public function connect_to_service( array $args = array() ): array {
240
240
241
241
if ( is_wp_error ( $ response ) ) {
242
242
add_settings_error (
243
- $ this ->get_option_name (),
243
+ $ this ->feature_instance -> get_option_name (),
244
244
'azure-text-to-request-failed ' ,
245
245
esc_html__ ( 'Azure Speech to Text: HTTP request failed. ' , 'classifai ' ),
246
246
'error '
@@ -254,7 +254,7 @@ public function connect_to_service( array $args = array() ): array {
254
254
// Return and render error if HTTP response status code is other than 200.
255
255
if ( WP_Http::OK !== $ http_code ) {
256
256
add_settings_error (
257
- $ this ->get_option_name (),
257
+ $ this ->feature_instance -> get_option_name (),
258
258
'azure-text-to-speech-auth-failed ' ,
259
259
esc_html__ ( 'Connection to Azure Text to Speech failed. ' , 'classifai ' ),
260
260
'error '
You can’t perform that action at this time.
0 commit comments