From: Steve Sutton Date: Thu, 5 Apr 2018 12:07:38 +0000 (-0400) Subject: If no account found for front end renewal form give message. X-Git-Tag: v1.0.0^2~76 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=e49d452398ea17d06dffd9abbeaff99feef8493d;p=WP-Plugins%2Fglm-member-db-billing.git If no account found for front end renewal form give message. Give a message that you must be logged in with member account. --- diff --git a/models/front/billing/renew.php b/models/front/billing/renew.php index b286c02..bf8e9cd 100644 --- a/models/front/billing/renew.php +++ b/models/front/billing/renew.php @@ -129,8 +129,7 @@ class GlmMembersFront_billing_renew // extends GlmDataBilling ) { $this->memberID = $this->config['loggedInUser']['contactUser']['ref_dest']; } else { - // throw an error - wp_die('Not finding any account for you!'); + $option = 'noaccount'; } // Check if there's a logged in user who is locked to their own entity. @@ -173,6 +172,9 @@ class GlmMembersFront_billing_renew // extends GlmDataBilling $account_status = apply_filters( 'glm-billing-get-account-status', '', $accountID ); switch ( $option ) { + case 'noaccount': + $view = 'noaccount'; + break; case 'renew': // TODO: only the renew form if the member is not active if ( $account_status == 'Active' ) { diff --git a/views/front/billing/noaccount.html b/views/front/billing/noaccount.html new file mode 100644 index 0000000..651f5b4 --- /dev/null +++ b/views/front/billing/noaccount.html @@ -0,0 +1,2 @@ +

No account found!

+

You must be logged in as a member.