Created
January 6, 2020 19:55
-
-
Save dancameron/601fa8344ac7292c2518fc31492a0170 to your computer and use it in GitHub Desktop.
Error Logging for Help Scout Desk Troubleshooting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // don't include this in your functions.php, since the start of the file should already have it | |
function _hsd_api_log( $data, $endpoint ) { | |
error_log( '************* HSD API LOG *************' ); | |
error_log( 'data' . print_r( $data, true ) ); | |
error_log( 'endpoint' . print_r( $endpoint, true ) ); | |
error_log( '************* HSD API LOG END *************' ); | |
} | |
add_filter( 'hsd_v2_api_request_params', '_hsd_api_log', 10, 2 ); | |
add_filter( 'hsd_v2_api_request', '_hsd_api_log', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment