Skip to content

Instantly share code, notes, and snippets.

@MegaphoneJon
Created December 28, 2021 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MegaphoneJon/c49857d9f68cf6292c3820be8a914213 to your computer and use it in GitHub Desktop.
Save MegaphoneJon/c49857d9f68cf6292c3820be8a914213 to your computer and use it in GitHub Desktop.
webform_civicrm 6.1.0 primary address fix
diff --git a/src/WebformCivicrmPostProcess.php b/src/WebformCivicrmPostProcess.php
--- a/src/WebformCivicrmPostProcess.php
+++ b/src/WebformCivicrmPostProcess.php
@@ -790,10 +790,6 @@
* @param int $c
*/
private function saveContactLocation($contact, $cid, $c) {
- // Check which location_type_id is to be set as is_primary=1;
- $is_primary_address_location_type = wf_crm_aval($contact, 'address:1:location_type_id');
- $is_primary_email_location_type = wf_crm_aval($contact, 'email:1:location_type_id');
-
foreach ($this->utils->wf_crm_location_fields() as $location) {
if (!empty($contact[$location])) {
$existing = [];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment