From: Steve Sutton Date: Tue, 4 Dec 2018 18:37:10 +0000 (-0500) Subject: Updating add contact processing X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=c7669721f26acf6e431ad0ca9cd0c193f10e6081;p=WP-Plugins%2Fglm-member-db-contacts.git 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. --- 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']