Enhanced Ecommerce Google Analytics Plugin for WooCommerce - Version 4.9.2

Version Description

  • 16/09/2022 =
  • In our latest release we have fixed the issues of product attribute mapping with SKU, GTIN and MPIN for variable products.
Download this release

Release Info

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

Code changes from version 4.9.1 to 4.9.2

admin/partials/general-fields.php CHANGED
@@ -312,7 +312,7 @@ if(isset($google_detail['setting'])){
312
  <img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
313
  </div>
314
  </span>
315
- <span style="float: right;"><a href="<?php echo esc_url_raw("https://".TVC_AUTH_CONNECT_URL."/help-center/event-tracking-custom-integration.pdf"); ?>" target="_blank">Detail document</a></span>
316
  </th></tr>
317
  <tr>
318
  <th style="padding: 0 1rem; width: 35%;">
312
  <img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
313
  </div>
314
  </span>
315
+ <span style="float: right;"><a href="<?php echo esc_url_raw("https://".TVC_AUTH_CONNECT_URL."/help-center/event-tracking-custom-integration.pdf"); ?>" target="_blank">Detailed Document</a></span>
316
  </th></tr>
317
  <tr>
318
  <th style="padding: 0 1rem; width: 35%;">
enhanced-ecommerce-google-analytics.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: Conversios.io - Google Analytics and Google Shopping plugin for WooCommerce
16
  * Plugin URI: https://www.tatvic.com/tatvic-labs/woocommerce-extension/
17
  * Description: Automates eCommerce tracking in Google Analytics, dynamic remarkting in Google Ads, and provides complete Google Shopping features.
18
- * Version: 4.9.1
19
  * Author: Conversios
20
  * Author URI: conversios.io
21
  * License: GPL-2.0+
@@ -37,7 +37,7 @@ if ( ! defined( 'WPINC' ) ) {
37
  * Start at version 1.0.0 and use SemVer - https://semver.org
38
  * Rename this for your plugin and update it as you release new versions.
39
  */
40
- define( 'PLUGIN_TVC_VERSION', '4.9.1' );
41
  $fullName = plugin_basename( __FILE__ );
42
  $dir = str_replace('/enhanced-ecommerce-google-analytics.php','',$fullName);
43
  if ( ! defined( 'ENHANCAD_PLUGIN_NAME' ) ) {
15
  * Plugin Name: Conversios.io - Google Analytics and Google Shopping plugin for WooCommerce
16
  * Plugin URI: https://www.tatvic.com/tatvic-labs/woocommerce-extension/
17
  * Description: Automates eCommerce tracking in Google Analytics, dynamic remarkting in Google Ads, and provides complete Google Shopping features.
18
+ * Version: 4.9.2
19
  * Author: Conversios
20
  * Author URI: conversios.io
21
  * License: GPL-2.0+
37
  * Start at version 1.0.0 and use SemVer - https://semver.org
38
  * Rename this for your plugin and update it as you release new versions.
39
  */
40
+ define( 'PLUGIN_TVC_VERSION', '4.9.2' );
41
  $fullName = plugin_basename( __FILE__ );
42
  $dir = str_replace('/enhanced-ecommerce-google-analytics.php','',$fullName);
43
  if ( ! defined( 'ENHANCAD_PLUGIN_NAME' ) ) {
includes/setup/class-tvc-product-sync-helper.php CHANGED
@@ -108,7 +108,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
108
  $postObj = (object) array_merge((array) get_post($postvalue->w_product_id), (array) $postmeta);
109
 
110
  $product = array(
111
- 'offer_id'=>sanitize_text_field($postvalue->w_product_id),
112
  'channel'=>'online',
113
  'link'=> esc_url_raw(get_permalink($postvalue->w_product_id)),
114
  'google_product_category'=>sanitize_text_field($postvalue->g_cat_id)
@@ -161,8 +161,8 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
161
  $product['title'] = (isset($postObj->$formArray_val))?sanitize_text_field($postObj->$formArray_val):get_the_title($postvalue->w_product_id);
162
  $tvc_temp_desc_key = $formArray['description'];
163
  $product['description'] = ( $variation_description != "")?sanitize_text_field($variation_description):sanitize_text_field($postObj->$tvc_temp_desc_key);
164
- $product['offer_id'] = $variation_id;
165
- $product['id'] = $variation_id;
166
  $product['item_group_id'] = $postvalue->w_product_id;
167
  $productTypes = $this->get_product_category($postvalue->w_product_id);
168
  if(!empty($productTypes)){
@@ -187,7 +187,14 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
187
  }
188
 
189
  foreach($formArray as $key => $value){
190
- if($key == 'price'){
 
 
 
 
 
 
 
191
  if(isset($postmeta_var->$value) && $postmeta_var->$value > 0){
192
  $product[$key]['value'] = $postmeta_var->$value;
193
  }else if(isset($postmeta_var->_regular_price) && $postmeta_var->_regular_price && $postmeta_var->_regular_price >0 ){
@@ -245,7 +252,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
245
  $product[$key] = sanitize_text_field($product_brand);
246
  }
247
  }else if(isset($postmeta_var->$value) && $postmeta_var->$value != ""){
248
- $product[$key] = sanitize_text_field($postmeta_var->$value);
249
  }
250
  }
251
  $item = [
@@ -268,7 +275,10 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
268
  }
269
  //$product['productTypes'] = "Apparel & Accessories";
270
  foreach($formArray as $key => $value){
271
- if($key == 'price'){
 
 
 
272
  if(isset($postObj->$value) && $postObj->$value > 0){
273
  $product[$key]['value'] = $postObj->$value;
274
  }else if(isset($postObj->_regular_price) && $postObj->_regular_price && $postObj->_regular_price >0 ){
108
  $postObj = (object) array_merge((array) get_post($postvalue->w_product_id), (array) $postmeta);
109
 
110
  $product = array(
111
+ //'offer_id'=>sanitize_text_field($postvalue->w_product_id),
112
  'channel'=>'online',
113
  'link'=> esc_url_raw(get_permalink($postvalue->w_product_id)),
114
  'google_product_category'=>sanitize_text_field($postvalue->g_cat_id)
161
  $product['title'] = (isset($postObj->$formArray_val))?sanitize_text_field($postObj->$formArray_val):get_the_title($postvalue->w_product_id);
162
  $tvc_temp_desc_key = $formArray['description'];
163
  $product['description'] = ( $variation_description != "")?sanitize_text_field($variation_description):sanitize_text_field($postObj->$tvc_temp_desc_key);
164
+ //$product['offer_id'] = $variation_id;
165
+ //$product['id'] = $variation_id;
166
  $product['item_group_id'] = $postvalue->w_product_id;
167
  $productTypes = $this->get_product_category($postvalue->w_product_id);
168
  if(!empty($productTypes)){
187
  }
188
 
189
  foreach($formArray as $key => $value){
190
+ if($key == 'id'){
191
+ $product[$key] = isset($postmeta_var->$value) ? $postmeta_var->$value : $variation_id;
192
+ $product['offer_id'] = isset($postmeta_var->$value) ? $postmeta_var->$value : $variation_id;
193
+ }elseif($key == 'gtin' && ( isset($postmeta_var->$value) || isset($postObj->$value) ) ){
194
+ $product[$key] = isset($postmeta_var->$value) ? $postmeta_var->$value : $postObj->$value;
195
+ }elseif($key == 'mpn' && ( isset($postmeta_var->$value) || isset($postObj->$value) )){
196
+ $product[$key] = isset($postmeta_var->$value) ? $postmeta_var->$value : $postObj->$value;
197
+ }elseif($key == 'price'){
198
  if(isset($postmeta_var->$value) && $postmeta_var->$value > 0){
199
  $product[$key]['value'] = $postmeta_var->$value;
200
  }else if(isset($postmeta_var->_regular_price) && $postmeta_var->_regular_price && $postmeta_var->_regular_price >0 ){
252
  $product[$key] = sanitize_text_field($product_brand);
253
  }
254
  }else if(isset($postmeta_var->$value) && $postmeta_var->$value != ""){
255
+ $product[$key] = sanitize_text_field($postmeta_var->$value);
256
  }
257
  }
258
  $item = [
275
  }
276
  //$product['productTypes'] = "Apparel & Accessories";
277
  foreach($formArray as $key => $value){
278
+ if($key == 'id'){
279
+ $product[$key] = isset($postObj->$value) ? $postObj->$value : $postvalue->w_product_id;
280
+ $product['offer_id'] = isset($postObj->$value) ? $postObj->$value : $postvalue->w_product_id;
281
+ }elseif($key == 'price'){
282
  if(isset($postObj->$value) && $postObj->$value > 0){
283
  $product[$key]['value'] = $postObj->$value;
284
  }else if(isset($postObj->_regular_price) && $postObj->_regular_price && $postObj->_regular_price >0 ){
readme.txt CHANGED
@@ -8,8 +8,8 @@ Author: Tatvic
8
  Requires at least: 3.5.0
9
  Tested up to: 6.0.2
10
  Requires PHP: 5.6 or Higher
11
- Stable tag: 4.9.1
12
- Version: 4.9.1
13
  License: GPLv3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
 
@@ -416,6 +416,9 @@ In GA3 (Universal Analytics) usually, it takes 0 to 45 mins and in GA4 it can ta
416
 
417
 
418
  == Changelog ==
 
 
 
419
  = 4.9.1 - 15/09/2022 =
420
  * Improvements and product optimization of auto scheduler for product sync. Users with sizable products will now have good time while running scheduler.
421
 
8
  Requires at least: 3.5.0
9
  Tested up to: 6.0.2
10
  Requires PHP: 5.6 or Higher
11
+ Stable tag: 4.9.2
12
+ Version: 4.9.2
13
  License: GPLv3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
 
416
 
417
 
418
  == Changelog ==
419
+ = 4.9.2 - 16/09/2022 =
420
+ * In our latest release we have fixed the issues of product attribute mapping with SKU, GTIN and MPIN for variable products.
421
+
422
  = 4.9.1 - 15/09/2022 =
423
  * Improvements and product optimization of auto scheduler for product sync. Users with sizable products will now have good time while running scheduler.
424