fix [#47] | Don't create new address only from user_country
This commit is contained in:
parent
4659b53522
commit
0ce2d2530b
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.
|
// Prepare parameter mapping for organisation.
|
||||||
if (!empty($params['user_company'])) {
|
if (!empty($params['user_company'])) {
|
||||||
$params['organization_name'] = $params['user_company'];
|
$params['organization_name'] = $params['user_company'];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue