Skip to content

Commit 5b2a414

Browse files
committed
Fix undefined calls
1 parent 4176ec4 commit 5b2a414

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

includes/Classifai/Providers/Azure/Personalizer.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,13 @@ public function sanitize_settings( array $new_settings ): array {
155155
}
156156

157157
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' );
159159

160160
foreach ( $settings_errors as $code => $message ) {
161161

162162
if ( ! in_array( $code, $registered_settings_errors, true ) ) {
163163
add_settings_error(
164-
$this->get_option_name(),
164+
$this->feature_instance->get_option_name(),
165165
$code,
166166
esc_html( $message ),
167167
'error'

includes/Classifai/Providers/Azure/Speech.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public function connect_to_service( array $args = array() ): array {
240240

241241
if ( is_wp_error( $response ) ) {
242242
add_settings_error(
243-
$this->get_option_name(),
243+
$this->feature_instance->get_option_name(),
244244
'azure-text-to-request-failed',
245245
esc_html__( 'Azure Speech to Text: HTTP request failed.', 'classifai' ),
246246
'error'
@@ -254,7 +254,7 @@ public function connect_to_service( array $args = array() ): array {
254254
// Return and render error if HTTP response status code is other than 200.
255255
if ( WP_Http::OK !== $http_code ) {
256256
add_settings_error(
257-
$this->get_option_name(),
257+
$this->feature_instance->get_option_name(),
258258
'azure-text-to-speech-auth-failed',
259259
esc_html__( 'Connection to Azure Text to Speech failed.', 'classifai' ),
260260
'error'

0 commit comments

Comments
 (0)