Set anniversary_date when adding accounts.
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 5 Apr 2018 12:46:33 +0000 (08:46 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 5 Apr 2018 12:46:33 +0000 (08:46 -0400)
When adding accouunts for employees need to set the anniversary date.

classes/billingSupport.php

index 96d9528..21b796e 100644 (file)
@@ -876,11 +876,13 @@ class GlmBillingSupport
                         $this->wpdb->insert(
                             GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . 'accounts',
                             array(
-                                'ref_dest' => $ref_dest,
-                                'ref_name' => $member_name,
+                                'ref_dest'         => $ref_dest,
+                                'ref_name'         => $member_name,
+                                'anniversary_date' => date( 'Y-m-d' )
                             ),
                             array(
                                 '%d',
+                                '%s',
                                 '%s'
                             )
                         );