From: Steve Sutton Date: Tue, 11 Jun 2019 13:12:10 +0000 (-0400) Subject: Update MiGCSA free members. X-Git-Tag: v1.0.30^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=e55dbe1c8c7ff72f33d3f47a1d8e2b30c92aa8d6;p=WP-Plugins%2Fglm-member-db-billing.git Update MiGCSA free members. Look for member type 9 also (retired). --- diff --git a/index.php b/index.php index c458189..91cc716 100644 --- a/index.php +++ b/index.php @@ -37,7 +37,9 @@ * so that we're sure the other add-ons see an up to date * version from this plugin. */ -define('GLM_MEMBERS_BILLING_PLUGIN_VERSION', '1.0.29'); +define('GLM_MEMBERS_BILLING_PLUGIN_VERSION', '1.0.30'); + +// Database Version define('GLM_MEMBERS_BILLING_PLUGIN_DB_VERSION', '0.0.26'); // This is the minimum version of the GLM Members DB plugin require for this plugin. diff --git a/models/admin/ajax/billingFlagExpiredUsers.php b/models/admin/ajax/billingFlagExpiredUsers.php index ed97f8a..65701d1 100644 --- a/models/admin/ajax/billingFlagExpiredUsers.php +++ b/models/admin/ajax/billingFlagExpiredUsers.php @@ -80,7 +80,7 @@ class GlmMembersAdmin_ajax_billingFlagExpiredUsers // Find all member contacts (by ref_dest) with accounts that are expired. // With those set their contact_role to 30 (login only) if ( $days_after_expired = filter_var( $days_after_expired, FILTER_VALIDATE_INT ) ) { - // Update any account that has invoice_type set to 0 and have an expired renewal_date + // Fix Free members // These would be memberships that are free so they don't pay. // They just get updated renewal dates. $this->wpdb->query( @@ -90,8 +90,9 @@ class GlmMembersAdmin_ajax_billingFlagExpiredUsers AND ref_dest IN ( SELECT id FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "members - WHERE member_type in ( 5, 7, 13))" + WHERE member_type in ( 5, 7, 9, 13))" ); + // Update any account that has invoice_type set to 0 and have an expired renewal_date $this->wpdb->query( "UPDATE " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "accounts SET renewal_date = renewal_date + INTERVAL 1 YEAR