HELP: Code To Check Status And Write Debug Entry
You can get the response code with wp_remote_retrieve_response_code() and log the response with error_log(). function my_better_uptime_heartbeat() { $worked = false; $response = wp_remote_get( ‘https://betteruptime.com/api/v1/heartbeat/<heartbeat_ID>’ ); if ( ! is_wp_error( $response ) ) { if ( 200 == wp_remote_retrieve_response_code( $response ) ) { // It worked, no need to log anything. $worked = true; } } … Read more