@@ 774-776 (lines=3) @@ | ||
771 | public function partner_cancel( $args, $named_args ) { |
|
772 | list( $token_json ) = $args; |
|
773 | ||
774 | if ( ! $token_json || ! ( $token = json_decode( $token_json ) ) ) { |
|
775 | $this->partner_provision_error( new WP_Error( 'missing_access_token', sprintf( __( 'Invalid token JSON: %s', 'jetpack' ), $token_json ) ) ); |
|
776 | } |
|
777 | ||
778 | if ( isset( $token->error ) ) { |
|
779 | $this->partner_provision_error( new WP_Error( $token->error, $token->message ) ); |
|
@@ 842-844 (lines=3) @@ | ||
839 | ||
840 | $user_id = $named_args['user_id']; |
|
841 | ||
842 | if ( ! $token_json || ! ( $token = json_decode( $token_json ) ) ) { |
|
843 | $this->partner_provision_error( new WP_Error( 'missing_access_token', sprintf( __( 'Invalid token JSON: %s', 'jetpack' ), $token_json ) ) ); |
|
844 | } |
|
845 | ||
846 | if ( isset( $token->error ) ) { |
|
847 | $this->partner_provision_error( new WP_Error( $token->error, $token->message ) ); |