From: Steve Sutton Date: Tue, 4 Dec 2018 16:00:45 +0000 (-0500) Subject: Update how to get ref_dest from employees. X-Git-Tag: v1.0.18^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=2755815c1c8bd34028a14cc1f1e53b8ca46ce95d;p=WP-Plugins%2Fglm-member-db-billing.git Update how to get ref_dest from employees. Already have the ref_dest in the account data. No need to look up by name. --- diff --git a/classes/billingSupport.php b/classes/billingSupport.php index 0bcd233..1dd2e09 100644 --- a/classes/billingSupport.php +++ b/classes/billingSupport.php @@ -926,14 +926,15 @@ class GlmBillingSupport // echo '
$billing_account: ' . print_r( $billing_account, true ) . '
'; // If we don't have an account for this member then one // Needs to be created. - $ref_dest = $this->wpdb->get_var( - $this->wpdb->prepare( - "SELECT id - FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "members - WHERE name = %s", - $emp['employee_name'] - ) - ); + // $ref_dest = $this->wpdb->get_var( + // $this->wpdb->prepare( + // "SELECT id + // FROM " . GLM_MEMBERS_PLUGIN_DB_PREFIX . "members + // WHERE name = %s", + // $emp['employee_name'] + // ) + // ); + $ref_dest = $billing_account['ref_dest']; // echo '
$ref_dest: ' . print_r( $ref_dest, true ) . '
'; if ( !$billing_account ) { // Get the Member Name diff --git a/index.php b/index.php index 60634cf..4c26673 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: GLM Members Billing * Plugin URI: http://www.gaslightmedia.com/ * Description: This is glmAssociate Billing Module - * Version: 1.0.17 + * Version: 1.0.18 * Author: Gaslight Media * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -19,7 +19,7 @@ * @package glmMembersBillingAddOn * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @version 1.0.17 + * @version 1.0.18 */ /* @@ -37,7 +37,7 @@ * 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.17'); +define('GLM_MEMBERS_BILLING_PLUGIN_VERSION', '1.0.18'); 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.