Sid Gifari File Manager
🏠 Root
/
home2
/
meumer25
/
meupet.app
/
wp-content
/
plugins
/
google-analytics-for-wordpress
/
includes
/
api
/
Editing: class-monsterinsights-api-error.php
<?php /** * Custom Error class for MonsterInsights API responses. * * Extends WP_Error to provide a custom error object from API responses. * * @package MonsterInsights */ class MonsterInsights_API_Error extends WP_Error { /** * Constructor. * * Creates a new WP_Error object from a MonsterInsights API error response. * * * @param array $response_body The decoded JSON response body containing the error details. */ public function __construct( $response_body ) { $error_data = $response_body['error']; $code = $error_data['code']; $message = $error_data['message']; $details = $error_data['details']; parent::__construct( $code, $message, $details ); } }
Save
Cancel