'POST', 'body' => $params->toQueryString(), )); if (!is_wp_error($response)) { return wp_remote_retrieve_body($response); } // Alltough we try to decode json we will throw the error throw $response->get_error_message(); } }