In WaApiClient->makeRequest. Errors currently go uncaught. Since changing the HTTP request method to use wp_remote_get and wp_remote_post the code is still detecting response errors with !$response. Instead, errors now need to be detected with is_wp_error.
Solution
Detect errors with is_wp_error
Add proper try and catch statements in functions highest in the call stack that use makeRequest
Description
In
WaApiClient->makeRequest
. Errors currently go uncaught. Since changing the HTTP request method to usewp_remote_get
andwp_remote_post
the code is still detecting response errors with!$response
. Instead, errors now need to be detected withis_wp_error
.Solution
is_wp_error
try
andcatch
statements in functions highest in the call stack that usemakeRequest