Skip to content

The donor model should have "Company", "Avatar", "Addresses", and "Anonymous" as properties #6824

Open
@glaubersilva

Description

@glaubersilva

User Story

As a developer, when using the Donor model to update donor properties, I want to be able to update the following info:

  • Company
  • Avatar
  • Addresses
  • Anonymous

Details

Currently, to update this info is necessary to use workarounds based on legacy code like here:

https://github.com/impress-org/givewp/blob/develop/src/DonorDashboards/Profile.php#L47-L73

Additional Context

The ideal would be able to update this info using something like this:

$donor = Donor::find($donorId);
$donor->company = 'Company Name';
$donor->avatar = 'Avatar Data';
$donor->primaryAddress = 'Primary Address';
$donor->additionalAddresses = ['Additional Addresses 1', 'Additional Addresses 2'];
$donor->anonymous = false;
$donor->save();

Acceptance Criteria

  • The "Company", "Avatar", "Addresses", and "Anonymous" donor's info can be updated through the Donor model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    keep-fresh"Keep Fresh" issues should not be marked as stale.type: enhancementAn improvement to existing user-facing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions