| @@ -13,13 +13,14 @@ | ||
| 13 | 13 | /** |
| 14 | 14 | * Initialize the class, registering WordPress hooks |
| 15 | 15 | */ |
| 16 | 16 | public static function init() { |
| 17 | - if ( WP_DEBUG && WP_DEBUG_LOG ) { | |
| 17 | + if ( WP_DEBUG_LOG ) { | |
| 18 | 18 | \add_action( 'activitypub_safe_remote_post_response', array( self::class, 'log_remote_post_responses' ), 10, 4 ); |
| 19 | 19 | } |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | + // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed, VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable | |
| 22 | 23 | public static function log_remote_post_responses( $response, $url, $body, $user_id ) { |
| 23 | 24 | // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log, WordPress.PHP.DevelopmentFunctions.error_log_print_r |
| 24 | 25 | \error_log( "Request to: {$url} with response: " . \print_r( $response, true ) ); |
| 25 | 26 | } |