From f11cc3cea4753e7485480c8d78f1303f7cd5f4c1 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 11 Jun 2015 10:26:26 -0400 Subject: [PATCH] Updated URL to track HTTPS status --- classes/glmMesGateway.php | 12 ++++++------ defines.php | 11 +++++++++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/classes/glmMesGateway.php b/classes/glmMesGateway.php index 24e6c9b..53458e5 100644 --- a/classes/glmMesGateway.php +++ b/classes/glmMesGateway.php @@ -152,6 +152,8 @@ class GlmMesGateway extends WC_Payment_Gateway { $this->name = GLM_MES_NAME; $this->text_domain = GLM_MES_DIR; + $this->id = GLM_MES_ID; + $this->method_title = __( "Merchant e-Solutions", 'glm-merchant_e_solutions' ); $this->respDescr = array( @@ -213,8 +215,6 @@ class GlmMesGateway extends WC_Payment_Gateway 'load_plugin_textdomain' )); - $this->id = GLM_MES_ID; - // Is WooCommerce activated? if (! in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { @@ -232,7 +232,7 @@ class GlmMesGateway extends WC_Payment_Gateway version_compare(WC_VERSION, GLM_MES_REQUIRED_WOO_VERSION, '>=')) { // Title of gateway and description displayed in WooCommerce Checkout configuration pages - $this->method_description = __('A Merchant e-Solutions payment Gateway plug-in for WooCommerce.', 'glm-merchant_e_solutions'); + $this->method_description = __('A Merchant e-Solutions payment Gateway plug-in for WooCommerce by Gaslight Media.', 'glm-merchant_e_solutions'); // Icon displayed with gateway in checkout page $this->icon = GLM_MES_ICON; @@ -463,7 +463,7 @@ class GlmMesGateway extends WC_Payment_Gateway /* * Initialize Form Fields * - * Add form fields to the WooCommerce Checkout page for this gateway + * Add form fields to the WooCommerce Checkout settings page for this gateway */ public function init_form_fields () { @@ -474,7 +474,7 @@ class GlmMesGateway extends WC_Payment_Gateway 'enabled' => array( 'title' => __('Enable/Disable', 'glm-merchant_e_solutions'), 'type' => 'checkbox', - 'label' => __('Enable Merchant e-Solutions Gateway', + 'label' => __('Enable Merchant e-Solutions Credit Card Payment Gateway', 'glm-merchant_e_solutions'), 'default' => 'yes' ), @@ -500,7 +500,7 @@ class GlmMesGateway extends WC_Payment_Gateway 'sep_0' => array( 'title' => __('Credit Cards Accepted', 'glm-merchant_e_solutions'), 'type' => 'title', - 'description' => '' + 'description' => 'These settings control the display icons depicting which credit cards are accepted by the merchant at checkout. ' ), // Visa diff --git a/defines.php b/defines.php index 3dff196..77bca92 100644 --- a/defines.php +++ b/defines.php @@ -23,9 +23,16 @@ define('GLM_MES_ASSETS_PATH', GLM_MES_PATH.'/assets'); define('GLM_MES_INCLUDES_PATH', GLM_MES_PATH.'/includes'); define('GLM_MES_LANGUAGE_PATH', GLM_MES_PATH.'/i18n/languages'); +// Get various pieces of the URL +$urlParts = parse_url(get_bloginfo('url')); +$pageUri = explode('?', $_SERVER['REQUEST_URI']); // Bust this up to access URL path and script name only + + // URLs -$pUrl = plugins_url( GLM_MES_DIR ); -define('GLM_MES_URL', $pUrl); +// $pUrl = plugins_url( GLM_MES_DIR ); +$pUrl = get_bloginfo('url'); + +define('GLM_MES_URL', $pUrl.'/wp-content/plugins/'.GLM_MES_DIR); define('GLM_MES_ASSETS_URL', GLM_MES_URL.'/assets'); // Optional Gateway Icon -- 2.17.1