Updated URL to track HTTPS status
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 11 Jun 2015 14:26:26 +0000 (10:26 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 11 Jun 2015 14:26:26 +0000 (10:26 -0400)
classes/glmMesGateway.php
defines.php

index 24e6c9b..53458e5 100644 (file)
@@ -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
index 3dff196..77bca92 100644 (file)
@@ -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