From c7669721f26acf6e431ad0ca9cd0c193f10e6081 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 4 Dec 2018 13:37:10 -0500 Subject: [PATCH] Updating add contact processing Need to ad the billing account update filter apply call inside the addnew case for creating contacts. Or the billing info is not saved. --- models/admin/contacts/index.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/models/admin/contacts/index.php b/models/admin/contacts/index.php index 3e98fef..d059439 100644 --- a/models/admin/contacts/index.php +++ b/models/admin/contacts/index.php @@ -285,6 +285,12 @@ class GlmMembersAdmin_contacts_index extends GlmDataContacts if ($contactInfo['status'] && !$newContactEmailExists && !$newContactUsernameExists && !$misMatchedWpUsers) { $contactInfoID = $contactInfo['fieldData']['id']; $customFieldResults = apply_filters( 'glm-member-db-save-custom-fields', $contactInfoID ); + if ( isset( $_REQUEST['ref_dest'] ) && $_REQUEST['ref_dest'] ) { + $member_id = filter_var( $_REQUEST['ref_dest'], FILTER_VALIDATE_INT ); + if ( $member_id ) { + $billingFieldResults = apply_filters( 'glm-members-billing-contact-save-data', $member_id ); + } + } // If there's an existing WordPress user matching the E-Mail address but that has a different username if ($contactCheck['wordpressEmail'] -- 2.17.1