Open
Description
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.