Enhanced Ecommerce Google Analytics Plugin for WooCommerce - Version 1.0.15

Version Description

Download this release

Release Info

Developer Tatvic
Plugin Icon 128x128 Enhanced Ecommerce Google Analytics Plugin for WooCommerce
Version 1.0.15
Comparing to
See all releases

Code changes from version 1.0.14 to 1.0.15

includes/class-wc-enhanced-ecommerce-google-analytics-integration.php CHANGED
@@ -18,7 +18,7 @@ class WC_Enhanced_Ecommerce_Google_Analytics extends WC_Integration {
18
  * @return void
19
  */
20
  //set plugin version
21
- public $tvc_eeVer = '1.0.14';
22
  public function __construct() {
23
 
24
  //Set Global Variables
@@ -141,13 +141,10 @@ class WC_Enhanced_Ecommerce_Google_Analytics extends WC_Integration {
141
  function init_form_fields() {
142
  $this->form_fields = array(
143
  "ga_email" => array(
144
- "title" => __("Email Address", "woocommerce"),
145
  "description" => __("Provide your work email address to receive plugin enhancement updates", "woocommerce"),
146
  "type" => "email",
147
  "placeholder" => "example@test.com",
148
- 'custom_attributes' => array(
149
- 'required' => "required",
150
- ),
151
  "desc_tip" => true,
152
  "default" => get_option("ga_email") // Backwards compat
153
  ),
@@ -212,15 +209,15 @@ class WC_Enhanced_Ecommerce_Google_Analytics extends WC_Integration {
212
  ),
213
  );
214
  /* When user updates the email, post it to the remote server */
215
- if (isset($_GET["tab"]) && isset($_REQUEST["section"]) && isset($_REQUEST["woocommerce_".$this->id."_ga_email"])) {
216
-
217
  $current_tab = ( empty($_GET["tab"]) ) ? false : sanitize_text_field(urldecode($_GET["tab"]));
218
  $current_section = ( empty($_REQUEST["section"]) ) ? false : sanitize_text_field(urldecode($_REQUEST["section"]));
219
  $save_for_the_plugin = ($current_tab == "integration" ) && ($current_section == $this->id);
220
 
221
  $update_made_for_email = $_REQUEST["woocommerce_".$this->id."_ga_email"] != $this->get_option("ga_email");
222
  if ($save_for_the_plugin && $update_made_for_email) {
223
- if ($_REQUEST["woocommerce_".$this->id."_ga_email"] != "") {
 
224
  $email = $_REQUEST["woocommerce_".$this->id."_ga_email"];
225
  $this->send_email_to_tatvic($email,'active');
226
  }
@@ -1149,6 +1146,10 @@ class WC_Enhanced_Ecommerce_Google_Analytics extends WC_Integration {
1149
  public function send_email_to_tatvic($email,$status) {
1150
  $url = "http://dev.tatvic.com/leadgen/woocommerce-plugin/store_email/";
1151
  //set POST variables
 
 
 
 
1152
  $fields = array(
1153
  "email" => urlencode($email),
1154
  "domain_name" => urlencode(get_site_url()),
18
  * @return void
19
  */
20
  //set plugin version
21
+ public $tvc_eeVer = '1.0.15';
22
  public function __construct() {
23
 
24
  //Set Global Variables
141
  function init_form_fields() {
142
  $this->form_fields = array(
143
  "ga_email" => array(
144
+ "title" => __("Email Address (Optional)", "woocommerce"),
145
  "description" => __("Provide your work email address to receive plugin enhancement updates", "woocommerce"),
146
  "type" => "email",
147
  "placeholder" => "example@test.com",
 
 
 
148
  "desc_tip" => true,
149
  "default" => get_option("ga_email") // Backwards compat
150
  ),
209
  ),
210
  );
211
  /* When user updates the email, post it to the remote server */
212
+ if (isset($_GET["tab"]) && isset($_REQUEST["section"]) && isset($_REQUEST["woocommerce_".$this->id."_ga_email"])) {
 
213
  $current_tab = ( empty($_GET["tab"]) ) ? false : sanitize_text_field(urldecode($_GET["tab"]));
214
  $current_section = ( empty($_REQUEST["section"]) ) ? false : sanitize_text_field(urldecode($_REQUEST["section"]));
215
  $save_for_the_plugin = ($current_tab == "integration" ) && ($current_section == $this->id);
216
 
217
  $update_made_for_email = $_REQUEST["woocommerce_".$this->id."_ga_email"] != $this->get_option("ga_email");
218
  if ($save_for_the_plugin && $update_made_for_email) {
219
+ // if ($_REQUEST["woocommerce_".$this->id."_ga_email"] != "")
220
+ {
221
  $email = $_REQUEST["woocommerce_".$this->id."_ga_email"];
222
  $this->send_email_to_tatvic($email,'active');
223
  }
1146
  public function send_email_to_tatvic($email,$status) {
1147
  $url = "http://dev.tatvic.com/leadgen/woocommerce-plugin/store_email/";
1148
  //set POST variables
1149
+ if($email == ""){
1150
+
1151
+ $email = "marketing@tatvic.com";
1152
+ }
1153
  $fields = array(
1154
  "email" => urlencode($email),
1155
  "domain_name" => urlencode(get_site_url()),
readme.txt CHANGED
@@ -7,8 +7,8 @@ Author URI: http://www.tatvic.com/
7
  Author: Tatvic
8
  Requires at least: 3.6
9
  Tested up to: 4.1
10
- Stable tag: 1.0.14
11
- Version: 1.0.14
12
  License: GPLv3
13
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
14
 
@@ -155,4 +155,7 @@ Important Note: When you update the plugin, please save your settings again.
155
  = 1.0.14 - 10/02/2015 =
156
  * Fixed - session_start() function warning
157
  * Fixed - Notice: Undefined variable: coupons_list
158
- * Fixed - woocommerce deprecated function warning
 
 
 
7
  Author: Tatvic
8
  Requires at least: 3.6
9
  Tested up to: 4.1
10
+ Stable tag: 1.0.15
11
+ Version: 1.0.15
12
  License: GPLv3
13
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
14
 
155
  = 1.0.14 - 10/02/2015 =
156
  * Fixed - session_start() function warning
157
  * Fixed - Notice: Undefined variable: coupons_list
158
+ * Fixed - woocommerce deprecated function warning
159
+
160
+ = 1.0.15 - 28/03/2015 =
161
+ * Email Field made optional
woocommerce-enhanced-ecommerce-google-analytics-integration.php CHANGED
@@ -21,7 +21,7 @@
21
  Description: Allows Enhanced E-commerce Google Analytics tracking code to be inserted into WooCommerce store pages.
22
  Author: Tatvic
23
  Author URI: http://www.tatvic.com
24
- Version: 1.0.14
25
  */
26
  if (!defined('ABSPATH')) {
27
  exit; // Exit if accessed directly
@@ -42,6 +42,9 @@ function wc_enhanced_ecommerce_google_analytics_add_integration($integrations) {
42
  function send_email_to_tatvic($email, $status) {
43
  $url = "http://dev.tatvic.com/leadgen/woocommerce-plugin/store_email/";
44
  //set POST variables
 
 
 
45
  $fields = array(
46
  "email" => urlencode($email),
47
  "domain_name" => urlencode(get_site_url()),
21
  Description: Allows Enhanced E-commerce Google Analytics tracking code to be inserted into WooCommerce store pages.
22
  Author: Tatvic
23
  Author URI: http://www.tatvic.com
24
+ Version: 1.0.15
25
  */
26
  if (!defined('ABSPATH')) {
27
  exit; // Exit if accessed directly
42
  function send_email_to_tatvic($email, $status) {
43
  $url = "http://dev.tatvic.com/leadgen/woocommerce-plugin/store_email/";
44
  //set POST variables
45
+ if($email == ""){
46
+ $email = "marketing@tatvic.com";
47
+ }
48
  $fields = array(
49
  "email" => urlencode($email),
50
  "domain_name" => urlencode(get_site_url()),