I installed this plugin in my local development environment to test it out for something else but coincidentally it conflicts with the plugin I develop (Post to Google My Business).
Whenever I create a new Google post through my plugin, it will start endlessly looping the same request to my API (and they get through to the API, but the local dev WordPress is stuck on a white screen, loading). I thought I had made a mistake somewhere in my development version, but then remembered I had installed this plugin and that it tracks outgoing requests from the server and figured it might be related. On the Telemetry tab I found 23 pages of errors like this:
Disabling the GDPR plugin fixed the issue with my plugin.
Is there something I need to change to my plugin to make it work with yours properly?
$response = wp_remote_post($url,
array(
'method' => $method,
'headers' => $json ? array('Content-Type' => 'application/json') : null,
'body' => $json ? json_encode($args) : $args
)
);
if(is_wp_error($response)){
$error_message = $response->get_error_message();
set_transient('mbp_api_error', $error_message, self::ERROR_DURATION);
}else{
$data = json_decode($response['body']);
if(!isset($data->error)){
return $data;
}else{
if(is_object($data->error)){
$error_message = nl2br($this->format_google_error($data));
}else{
$error_message = (string)$data->error;
}
set_transient('mbp_api_error', $error_message, self::ERROR_DURATION);
}
}
}