We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb999aa commit f7cab1aCopy full SHA for f7cab1a
tawkto/tawkto.php
@@ -436,14 +436,14 @@ private static function validate_js_api_key( &$fields ) {
436
return;
437
}
438
439
- try {
440
- if ( 40 !== strlen( $fields['js_api_key'] ) ) {
441
- throw new Exception( 'Invalid key. Please provide value with 40 characters' );
442
- }
+ if ( 40 !== strlen( $fields['js_api_key'] ) ) {
+ throw new Exception( 'Invalid API key.' );
+ }
443
+ try {
444
$fields['js_api_key'] = self::get_encrypted_data( $fields['js_api_key'] );
445
} catch ( Exception $e ) {
446
- self::show_tawk_options_error( 'Javascript API Key: ' . $e->getMessage() );
+ self::show_tawk_options_error( 'Error saving Javascript API Key.' );
447
448
unset( $fields['js_api_key'] );
449
0 commit comments