From d972033196c9ec94bed349fb9d457e3f99526b70 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Tue, 19 Jun 2018 13:17:36 -0400 Subject: [PATCH] Fix for errors on the sign up form fixing recaptcha issue fixing processing error issue with creating user. --- index.php | 6 +++--- models/front/billing/becomeMember.php | 11 ++++++----- views/front/billing/becomeMember.html | 4 +++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/index.php b/index.php index 9095d56..df0cabb 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.0 + * Version: 1.0.1 * 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.0 + * @version 1.0.1 */ /* @@ -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.0'); +define('GLM_MEMBERS_BILLING_PLUGIN_VERSION', '1.0.1'); define('GLM_MEMBERS_BILLING_PLUGIN_DB_VERSION', '0.0.25'); // This is the minimum version of the GLM Members DB plugin require for this plugin. diff --git a/models/front/billing/becomeMember.php b/models/front/billing/becomeMember.php index 1982df1..0a8390f 100644 --- a/models/front/billing/becomeMember.php +++ b/models/front/billing/becomeMember.php @@ -124,7 +124,7 @@ class GlmMembersFront_billing_becomeMember // extends GlmDataBilling 'blocking' => true, 'headers' => array(), 'body' => array( - 'secret' => '6LfEilYUAAAAAIcRJthzVTjLxiznY4DiYP3zDqIw', + 'secret' => $this->config['settings']['recaptcha_secret_key'], 'response' => $_REQUEST['g-recaptcha-response'], 'remoteip' => $_SERVER['REMOTE_ADDR'] ), @@ -442,9 +442,7 @@ class GlmMembersFront_billing_becomeMember // extends GlmDataBilling } // Save or rollback if ( $error ) { - $this->wpdb->query('ROLLBACK'); } else { - $this->wpdb->query('COMMIT'); // $this->wpdb->query('ROLLBACK'); // Fetch the invoice type chosen by the member. @@ -487,7 +485,9 @@ class GlmMembersFront_billing_becomeMember // extends GlmDataBilling } if ( $error ) { + $this->wpdb->query('ROLLBACK'); } else { + $this->wpdb->query('COMMIT'); $invoiceHtml = $BillingSupport->viewInvoice( $invoice_id ); $view = 'thankyou'; // Send admin user email notification of new member @@ -516,13 +516,14 @@ class GlmMembersFront_billing_becomeMember // extends GlmDataBilling break; default: - wp_register_script( 'recaptcha', 'https://www.google.com/recaptcha/api.js' ); - wp_enqueue_script( 'recaptcha' ); $payable_types = $BillingSupport->getAllPayableInvoiceTypes(); break; } + wp_register_script( 'recaptcha', 'https://www.google.com/recaptcha/api.js' ); + wp_enqueue_script( 'recaptcha' ); + // Load DataClass for Management. require_once GLM_MEMBERS_BILLING_PLUGIN_CLASS_PATH . '/data/dataManagement.php'; $Management = new GlmDataBillingManagement( $this->wpdb, $this->config ); diff --git a/views/front/billing/becomeMember.html b/views/front/billing/becomeMember.html index e6c8446..3141cb7 100644 --- a/views/front/billing/becomeMember.html +++ b/views/front/billing/becomeMember.html @@ -473,7 +473,9 @@ -
+ {if $settings.recaptcha_site_key} +
+ {/if} -- 2.17.1