public static function loadMemberFromInvite($invite_code) {
    // Create Member entity.
    $memberValues = [
      'membership_id' => $invite_code,
      'is_non_y_member' => TRUE,
    ];

    // Load Member by unique Membership ID.
    $query = \Drupal::entityQuery('openy_campaign_member')
      ->condition('membership_id', $invite_code);
    $result = $query->execute();
    if (!empty($result)) {
      $memberID = reset($result);
      $member = Member::load($memberID);

      // Update Member entity with values.
      foreach ($memberValues as $field => $value) {
        $member->set($field, $value);
      }
      return $member;
    }

    /** @var Member $member Otherwise create temporary Member object. Will be saved later. */
    $member = \Drupal::entityTypeManager()
      ->getStorage('openy_campaign_member')
      ->create($memberValues);
    return $member;
  }