Skip to content

Commit da83113

Browse files
authored
Merge pull request #862 from Codeinwp/feat/whitelist-hard-limit
chore: adapt for whitelist limit error
2 parents 9ad0a81 + 38be47d commit da83113

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

inc/api.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ public function request( $path, $method = 'GET', $params = [], $extra_headers =
206206
return 'disconnect';
207207
}
208208

209+
if ( $path === '/optml/v2/account/details'
210+
&& isset( $response['error'] ) && $response['error'] === 'whitelist_limit_reached' ) {
211+
return 'disconnect';
212+
}
213+
209214
return isset( $response['error'] ) ? new WP_Error(
210215
'api_error',
211216
wp_kses(

0 commit comments

Comments
 (0)