From: Steve Sutton Date: Wed, 6 Jun 2018 18:07:42 +0000 (-0400) Subject: Don't update member contact for billing with 0 as invoice type X-Git-Tag: v1.0.0^2~5 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=1838a7d1aef6bee04eb151b085070b03944ef410;p=WP-Plugins%2Fglm-member-db-billing.git Don't update member contact for billing with 0 as invoice type invoice_type 0 is for free membership. --- diff --git a/models/admin/ajax/billingFlagExpiredUsers.php b/models/admin/ajax/billingFlagExpiredUsers.php index 9bfb69d..2fa73f9 100644 --- a/models/admin/ajax/billingFlagExpiredUsers.php +++ b/models/admin/ajax/billingFlagExpiredUsers.php @@ -83,7 +83,8 @@ class GlmMembersAdmin_ajax_billingFlagExpiredUsers $members = $this->wpdb->get_results( "SELECT ref_dest FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "accounts - WHERE renewal_date + INTERVAL 1 YEAR + INTERVAL $days_after_expired DAY <= '$current_date'", + WHERE renewal_date + INTERVAL 1 YEAR + INTERVAL $days_after_expired DAY <= '$current_date' + AND invoice_type != 0", ARRAY_A ); if ( isset( $members ) && $members ) { @@ -106,6 +107,7 @@ class GlmMembersAdmin_ajax_billingFlagExpiredUsers SELECT ref_dest FROM " . GLM_MEMBERS_BILLING_PLUGIN_DB_PREFIX . "accounts WHERE renewal_date + INTERVAL 1 YEAR + INTERVAL $days_after_expired DAY <= '$current_date' + AND invoice_type != 0 ) AND contact_role <> " . $restrictedRole );