From f62f13c8f3cd43b944bf5117b31b37f324ee3eb1 Mon Sep 17 00:00:00 2001 From: Amy Evans Date: Mon, 2 Aug 2021 15:33:12 -0400 Subject: [PATCH] Update hook name and fire for all non-200 requests --- inc/integrations/class-pico.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/inc/integrations/class-pico.php b/inc/integrations/class-pico.php index f677e043..441d42b9 100644 --- a/inc/integrations/class-pico.php +++ b/inc/integrations/class-pico.php @@ -233,12 +233,9 @@ public function verify_pico_user_for_sso( array $user ) { $response = $this->verification_request( $this->verify_user_path, $payload, $credentials ); - // Provide a hook for logging that the API key is invalid. - if ( 401 === $response['status_code'] ) { - do_action( 'wp_irving_pico_api_key_invalid', $response ); - } - if ( 200 !== $response['status_code'] ) { + // Provide a hook for logging errors. + do_action( 'wp_irving_verify_pico_user_api_error', $response ); return false; }