Update new member form for address
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 13 Sep 2018 12:33:23 +0000 (08:33 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 13 Sep 2018 12:33:23 +0000 (08:33 -0400)
Place the address into business fields.

models/front/billing/becomeMember.php

index 2aab802..f56704f 100644 (file)
@@ -290,23 +290,24 @@ class GlmMembersFront_billing_becomeMember // extends GlmDataBilling
             $this->wpdb->insert(
                 GLM_MEMBERS_CONTACTS_PLUGIN_DB_PREFIX . 'contacts',
                 array(
-                    'active'          => true,
-                    'primary_contact' => true,
-                    'access'          => $this->config['access_numb']['Full'],
-                    'fname'           => $member_fname,
-                    'lname'           => $member_lname,
-                    'contact_type'    => $this->config['contact_type_numb']['Personal'],
-                    'contact_role'    => $contactRoleNumb,
-                    'email'           => $memberContactEmail,
-                    'username'        => $memberLogin,
-                    'notes'           => 'Become Member Form.',
-                    'create_time'     => date('Y-m-d H:i:s', time()),
-                    'ref_type'        => $this->config['ref_type_numb']['Member'],
-                    'ref_dest'        => $member_id,
-                    'business_addr1'  => $billing_addr1,
-                    'business_city'   => $billing_city_id,
-                    'business_state'  => $billing_state,
-                    'business_zip'    => $billing_zip,
+                    'active'           => true,
+                    'primary_contact'  => true,
+                    'access'           => $this->config['access_numb']['Full'],
+                    'fname'            => $member_fname,
+                    'lname'            => $member_lname,
+                    'contact_type'     => $this->config['contact_type_numb']['Personal'],
+                    'contact_role'     => $contactRoleNumb,
+                    'email'            => $memberContactEmail,
+                    'username'         => $memberLogin,
+                    'notes'            => 'Become Member Form.',
+                    'create_time'      => date('Y-m-d H:i:s', time()),
+                    'ref_type'         => $this->config['ref_type_numb']['Member'],
+                    'ref_dest'         => $member_id,
+                    'business_addr1'   => $billing_addr1,
+                    'business_city'    => $billing_city_id,
+                    'business_state'   => $billing_state,
+                    'business_zip'     => $billing_zip,
+                    'business_publish' => 1
                 ),
                 array(
                     '%d', // active
@@ -326,6 +327,7 @@ class GlmMembersFront_billing_becomeMember // extends GlmDataBilling
                     '%s', // city
                     '%s', // state
                     '%s', // zip
+                    '%s', // business_publish
                 )
             );
             $newContactID = $this->wpdb->insert_id;