The WordPress codebase exposes some extraordinarily useful hooks for troubleshooting within the WP_Http class. In particular the http_api_debug action which passes the response to the request or an instance of WP_Error on failure. Combining that with the WC_Logger could be used to implement a basic HTTP debug logger. Something along the lines of: If one […]
Logging XHR Requests
If your WooCommerce site is having problems at checkout, but you’re not really sure what is behind it (i.e. steps to reproduce have not been identified) logging XHR requests (and JavaScript errors) from the checkout page can provide some insight into what is happening. This technique would require that you had a listener setup somewhere […]