Make sure a non-shared submitted address is being added to the individual contact.
This commit is contained in:
parent
264da53033
commit
e2f4e51f94
1 changed files with 13 additions and 15 deletions
|
@ -311,9 +311,8 @@ function civicrm_api3_twingle_donation_Submit($params) {
|
||||||
$params['location_type_id'] = (int) $profile->getAttribute('location_type_id');
|
$params['location_type_id'] = (int) $profile->getAttribute('location_type_id');
|
||||||
|
|
||||||
// Exclude address for now when retrieving/creating the individual contact
|
// Exclude address for now when retrieving/creating the individual contact
|
||||||
// and an organisation is given, as we are checking organisation address
|
// as we are checking organisation address first and share it with the
|
||||||
// first and share it with the individual.
|
// individual.
|
||||||
if (!empty($params['organization_name'])) {
|
|
||||||
$submitted_address = array();
|
$submitted_address = array();
|
||||||
foreach (array(
|
foreach (array(
|
||||||
'street_address',
|
'street_address',
|
||||||
|
@ -327,7 +326,6 @@ function civicrm_api3_twingle_donation_Submit($params) {
|
||||||
unset($params[$address_component]);
|
unset($params[$address_component]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Get the ID of the contact matching the given contact data, or create a
|
// Get the ID of the contact matching the given contact data, or create a
|
||||||
// new contact if none exists for the given contact data.
|
// new contact if none exists for the given contact data.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue