Skip to content

Commit

Permalink
fix: when service update cron returns an error, we should use the old…
Browse files Browse the repository at this point in the history
… data
  • Loading branch information
selul committed Jul 20, 2019
1 parent adf3042 commit 4f80cc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ function daily_sync() {

$request = new Optml_Api();
$data = $request->get_user_data( $api_key );
if ( $data === false ) {
if ( $data === false || is_wp_error( $data ) ) {
return;
}

Expand Down

0 comments on commit 4f80cc0

Please sign in to comment.