Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/hostinge.../includes
File: Errors.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Hostinger;
[2] Fix | Delete
[3] Fix | Delete
defined( 'ABSPATH' ) || exit;
[4] Fix | Delete
[5] Fix | Delete
class Errors {
[6] Fix | Delete
[7] Fix | Delete
private $error_messages;
[8] Fix | Delete
[9] Fix | Delete
public function __construct() {
[10] Fix | Delete
$this->error_messages = array(
[11] Fix | Delete
'action_failed' => array(
[12] Fix | Delete
'default' => __( 'Action Failed. Try again or contact support. Apologies.', 'hostinger-easy-onboarding' ),
[13] Fix | Delete
),
[14] Fix | Delete
'unexpected_error' => array(
[15] Fix | Delete
'default' => __( 'An unexpected error occurred. Please try again or contact support.', 'hostinger-easy-onboarding' ),
[16] Fix | Delete
),
[17] Fix | Delete
'server_error' => array(
[18] Fix | Delete
'default' => __( 'We apologize for the inconvenience. The AI content generation process encountered a server error. Please try again later, and if the issue persists, kindly contact our support team for assistance.', 'hostinger-easy-onboarding' ),
[19] Fix | Delete
),
[20] Fix | Delete
);
[21] Fix | Delete
}
[22] Fix | Delete
[23] Fix | Delete
public function get_error_message( string $error_code ) {
[24] Fix | Delete
if ( array_key_exists( $error_code, $this->error_messages ) ) {
[25] Fix | Delete
$message_data = $this->error_messages[ $error_code ];
[26] Fix | Delete
[27] Fix | Delete
return $message_data['default'];
[28] Fix | Delete
} else {
[29] Fix | Delete
return __( 'Unknown error code.', 'hostinger-easy-onboarding' );
[30] Fix | Delete
}
[31] Fix | Delete
}
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
new Errors();
[35] Fix | Delete
[36] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function