fix [#47] | Don't create new address only from user_country
This commit is contained in:
parent
197563920a
commit
a30b8f02cb
1 changed files with 10 additions and 0 deletions
|
@ -335,6 +335,16 @@ function civicrm_api3_twingle_donation_Submit($params) {
|
|||
}
|
||||
}
|
||||
|
||||
// Do not creat a new address if user_country is the only address
|
||||
// parameter. See issue #47
|
||||
if (
|
||||
!array_key_exists('street_address', $params) &&
|
||||
!array_key_exists('postal_code', $params) &&
|
||||
!array_key_exists('city', $params)
|
||||
) {
|
||||
unset($params['country']);
|
||||
}
|
||||
|
||||
// Prepare parameter mapping for organisation.
|
||||
if (!empty($params['user_company'])) {
|
||||
$params['organization_name'] = $params['user_company'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue