Skip to content

Instantly share code, notes, and snippets.

@afragen
Created June 27, 2026 18:03
Show Gist options
  • Select an option

  • Save afragen/72844bc519f4a3be9bd1985feaaacfaf to your computer and use it in GitHub Desktop.

Select an option

Save afragen/72844bc519f4a3be9bd1985feaaacfaf to your computer and use it in GitHub Desktop.
Some filters to activate API request and token refresh error logging.
<?php
/**
* Plugin Name: Git Updater Error Logging
* Description: A plugin to help debug Git Updater issues by logging API requests and responses.
* Version: 0.1.0
* Author: Andy Fragen
* License: MIT
* Requires at least: 6.8
* Requires PHP: 8.2
* Network: true
* Gist Plugin URI: https://gist.github.com/afragen/72844bc519f4a3be9bd1985feaaacfaf
*/
namespace Fragen\Git_Updater_Error_Logging;
/**
* Bootstrap
*
* @return void
*/
function bootstrap(): void {
add_filter( 'gu_debug_api_requests', '__return_true' );
add_filter( 'gu_debug_token_refresh', '__return_true' );
}
bootstrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment