Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Update hook name and fire for all non-200 requests
Browse files Browse the repository at this point in the history
  • Loading branch information
amyevans committed Aug 2, 2021
1 parent 3f9d0a4 commit f62f13c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions inc/integrations/class-pico.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f62f13c

Please sign in to comment.