@@ 770-772 (lines=3) @@ | ||
767 | public function partner_cancel( $args, $named_args ) { |
|
768 | list( $token_json ) = $args; |
|
769 | ||
770 | if ( ! $token_json || ! ( $token = json_decode( $token_json ) ) ) { |
|
771 | $this->partner_provision_error( new WP_Error( 'missing_access_token', sprintf( __( 'Invalid token JSON: %s', 'jetpack' ), $token_json ) ) ); |
|
772 | } |
|
773 | ||
774 | if ( isset( $token->error ) ) { |
|
775 | $this->partner_provision_error( new WP_Error( $token->error, $token->message ) ); |
|
@@ 838-840 (lines=3) @@ | ||
835 | ||
836 | $user_id = $named_args['user_id']; |
|
837 | ||
838 | if ( ! $token_json || ! ( $token = json_decode( $token_json ) ) ) { |
|
839 | $this->partner_provision_error( new WP_Error( 'missing_access_token', sprintf( __( 'Invalid token JSON: %s', 'jetpack' ), $token_json ) ) ); |
|
840 | } |
|
841 | ||
842 | if ( isset( $token->error ) ) { |
|
843 | $this->partner_provision_error( new WP_Error( $token->error, $token->message ) ); |