Enhanced Ecommerce Google Analytics Plugin for WooCommerce - Version 4.6.0

Version Description

  • 26/01/2022 =

  • In this release, bug fixed and performance improvement.

  • We have fixed the onboarding issue which was raised by some users.

Download this release

Release Info

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

Code changes from version 4.5.9 to 4.6.0

admin/helper/class-onboarding-helper.php CHANGED
@@ -309,8 +309,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
309
  * @since 4.0.2
310
  */
311
  public function save_wp_setting_from_subscription_api($api_obj, $tvc_data, $subscription_id){
312
- //print_r($tvc_data);
313
- //echo "=================";
314
  $TVC_Admin_Helper = new TVC_Admin_Helper();
315
  $google_detail = $api_obj->getSubscriptionDetails($tvc_data, $subscription_id);
316
  /**
@@ -634,7 +633,6 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
634
  $response_code = wp_remote_retrieve_response_code($request);
635
  $response_message = wp_remote_retrieve_response_message($request);
636
  $response = json_decode(wp_remote_retrieve_body($request));
637
- //print_r($response);
638
  $return = new \stdClass();
639
  if (isset($response->error) && $response->error == '') {
640
  $return->status = $response_code;
@@ -694,19 +692,18 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
694
  $url = $this->apiDomain . '/adwords/create-ads-account';
695
  $header = array("Authorization: Bearer MTIzNA==", "Content-Type" => "application/json");
696
  $data = [
 
697
  'email' => sanitize_email($tvc_data->g_mail),
698
  'currency' => sanitize_text_field($tvc_data->currency_code),
699
  'time_zone' => sanitize_text_field($tvc_data->timezone_string), //'Asia/Kolkata',
700
  'domain' => sanitize_text_field($tvc_data->user_domain)
701
  ];
702
- //print_r( $data );
703
  $args = array(
704
  'headers' =>$header,
705
  'method' => 'POST',
706
  'body' => wp_json_encode($data)
707
  );
708
  $result = $this->tc_wp_remot_call_post(esc_url_raw($url), $args);
709
- //print_r($result);
710
  $return = new \stdClass();
711
  if($result->status == 200){
712
  $return->status = $result->status;
@@ -751,6 +748,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
751
  ]
752
  ];
753
  $args = array(
 
754
  'headers' =>$header,
755
  'method' => 'POST',
756
  'body' => wp_json_encode($data)
@@ -831,6 +829,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
831
  'link_google_analytics_with_google_ads' => sanitize_text_field((isset($postData['link_google_analytics_with_google_ads']) && $postData['link_google_analytics_with_google_ads'] == 'true') ? 1 : 0)
832
  ];
833
  $args = array(
 
834
  'headers' =>$header,
835
  'method' => 'POST',
836
  'body' => wp_json_encode($data)
@@ -928,7 +927,6 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
928
  $response_code = wp_remote_retrieve_response_code($request);
929
  $response_message = wp_remote_retrieve_response_message($request);
930
  $result = json_decode(wp_remote_retrieve_body($request));
931
- //print_r($result);
932
  $return = new \stdClass();
933
  if($response_code == 200 && isset($result->error) && $result->error == ''){
934
  $return->status = $response_code;
@@ -956,6 +954,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
956
  'adwords_id' => sanitize_text_field($postData['adwords_id'])
957
  ];
958
  $args = array(
 
959
  'headers' => array(
960
  'Authorization' => "Bearer $this->token",
961
  'Content-Type' => 'application/json',
@@ -998,6 +997,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
998
  'setup_end_time' => date('Y-m-d H:i:s')
999
  ];
1000
  $args = array(
 
1001
  'headers' => array(
1002
  'Authorization' => "Bearer $this->token",
1003
  'Content-Type' => 'application/json'
@@ -1045,6 +1045,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
1045
  "Content-Type" => "application/json"
1046
  );
1047
  $args = array(
 
1048
  'headers' =>$header,
1049
  'method' => 'POST',
1050
  'body' => wp_json_encode($postData)
@@ -1117,7 +1118,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
1117
  }
1118
  public function generateAccessToken($access_token, $refresh_token) {
1119
  $url = "https://www.googleapis.com/oauth2/v1/tokeninfo?=" . $access_token;
1120
- $request = wp_remote_get(esc_url_raw($url), array("access_token"=>$access_token));
1121
  $response_code = wp_remote_retrieve_response_code($request);
1122
 
1123
  $response_message = wp_remote_retrieve_response_message($request);
@@ -1137,6 +1138,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
1137
  'refresh_token' => sanitize_text_field($refresh_token),
1138
  ];
1139
  $args = array(
 
1140
  'headers' =>$header,
1141
  'method' => 'POST',
1142
  'body' => $data
309
  * @since 4.0.2
310
  */
311
  public function save_wp_setting_from_subscription_api($api_obj, $tvc_data, $subscription_id){
312
+
 
313
  $TVC_Admin_Helper = new TVC_Admin_Helper();
314
  $google_detail = $api_obj->getSubscriptionDetails($tvc_data, $subscription_id);
315
  /**
633
  $response_code = wp_remote_retrieve_response_code($request);
634
  $response_message = wp_remote_retrieve_response_message($request);
635
  $response = json_decode(wp_remote_retrieve_body($request));
 
636
  $return = new \stdClass();
637
  if (isset($response->error) && $response->error == '') {
638
  $return->status = $response_code;
692
  $url = $this->apiDomain . '/adwords/create-ads-account';
693
  $header = array("Authorization: Bearer MTIzNA==", "Content-Type" => "application/json");
694
  $data = [
695
+ 'subscription_id' => sanitize_text_field($tvc_data->subscription_id),
696
  'email' => sanitize_email($tvc_data->g_mail),
697
  'currency' => sanitize_text_field($tvc_data->currency_code),
698
  'time_zone' => sanitize_text_field($tvc_data->timezone_string), //'Asia/Kolkata',
699
  'domain' => sanitize_text_field($tvc_data->user_domain)
700
  ];
 
701
  $args = array(
702
  'headers' =>$header,
703
  'method' => 'POST',
704
  'body' => wp_json_encode($data)
705
  );
706
  $result = $this->tc_wp_remot_call_post(esc_url_raw($url), $args);
 
707
  $return = new \stdClass();
708
  if($result->status == 200){
709
  $return->status = $result->status;
748
  ]
749
  ];
750
  $args = array(
751
+ 'timeout' => 10000,
752
  'headers' =>$header,
753
  'method' => 'POST',
754
  'body' => wp_json_encode($data)
829
  'link_google_analytics_with_google_ads' => sanitize_text_field((isset($postData['link_google_analytics_with_google_ads']) && $postData['link_google_analytics_with_google_ads'] == 'true') ? 1 : 0)
830
  ];
831
  $args = array(
832
+ 'timeout' => 10000,
833
  'headers' =>$header,
834
  'method' => 'POST',
835
  'body' => wp_json_encode($data)
927
  $response_code = wp_remote_retrieve_response_code($request);
928
  $response_message = wp_remote_retrieve_response_message($request);
929
  $result = json_decode(wp_remote_retrieve_body($request));
 
930
  $return = new \stdClass();
931
  if($response_code == 200 && isset($result->error) && $result->error == ''){
932
  $return->status = $response_code;
954
  'adwords_id' => sanitize_text_field($postData['adwords_id'])
955
  ];
956
  $args = array(
957
+ 'timeout' => 10000,
958
  'headers' => array(
959
  'Authorization' => "Bearer $this->token",
960
  'Content-Type' => 'application/json',
997
  'setup_end_time' => date('Y-m-d H:i:s')
998
  ];
999
  $args = array(
1000
+ 'timeout' => 10000,
1001
  'headers' => array(
1002
  'Authorization' => "Bearer $this->token",
1003
  'Content-Type' => 'application/json'
1045
  "Content-Type" => "application/json"
1046
  );
1047
  $args = array(
1048
+ 'timeout' => 10000,
1049
  'headers' =>$header,
1050
  'method' => 'POST',
1051
  'body' => wp_json_encode($postData)
1118
  }
1119
  public function generateAccessToken($access_token, $refresh_token) {
1120
  $url = "https://www.googleapis.com/oauth2/v1/tokeninfo?=" . $access_token;
1121
+ $request = wp_remote_get(esc_url_raw($url), array( "access_token" => $access_token, 'timeout' => 10000 ));
1122
  $response_code = wp_remote_retrieve_response_code($request);
1123
 
1124
  $response_message = wp_remote_retrieve_response_message($request);
1138
  'refresh_token' => sanitize_text_field($refresh_token),
1139
  ];
1140
  $args = array(
1141
+ 'timeout' => 10000,
1142
  'headers' =>$header,
1143
  'method' => 'POST',
1144
  'body' => $data
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.5.9
19
  * Author: Tatvic
20
  * Author URI: www.tatvic.com
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.5.9' );
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.6.0
19
  * Author: Tatvic
20
  * Author URI: www.tatvic.com
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.6.0' );
41
  $fullName = plugin_basename( __FILE__ );
42
  $dir = str_replace('/enhanced-ecommerce-google-analytics.php','',$fullName);
43
  if ( ! defined( 'ENHANCAD_PLUGIN_NAME' ) ) {
includes/setup/CustomApi.php CHANGED
@@ -123,6 +123,7 @@ class CustomApi{
123
  }
124
  }
125
  $args = array(
 
126
  'headers' => array(
127
  'Authorization' => "Bearer $this->token",
128
  'Content-Type' => 'application/json'
@@ -203,6 +204,7 @@ class CustomApi{
203
  'subscription_id'=>sanitize_text_field($subscription_id)
204
  ];
205
  $args = array(
 
206
  'headers' =>$header,
207
  'method' => 'POST',
208
  'body' => wp_json_encode($data)
@@ -285,6 +287,7 @@ class CustomApi{
285
  'customer_id' => sanitize_text_field($customer_id)
286
  ];
287
  $args = array(
 
288
  'headers' =>$header,
289
  'method' => 'POST',
290
  'body' => wp_json_encode($data)
@@ -412,6 +415,7 @@ class CustomApi{
412
  $url = $this->apiDomain . '/gmc/gmc-category-mapping';
413
 
414
  $args = array(
 
415
  'headers' => array(
416
  'Authorization' => "Bearer $this->token",
417
  'Content-Type' => 'application/json'
@@ -453,6 +457,7 @@ class CustomApi{
453
  $url = $this->apiDomain . '/gmc/gmc-attribute-mapping';
454
 
455
  $args = array(
 
456
  'headers' => array(
457
  'Authorization' => "Bearer $this->token",
458
  'Content-Type' => 'application/json'
@@ -585,6 +590,7 @@ class CustomApi{
585
  $url = $this->apiDomain . '/campaigns/currency-symbol';
586
 
587
  $args = array(
 
588
  'headers' => array(
589
  'Authorization' => "Bearer $this->token",
590
  'Content-Type' => 'application/json'
@@ -618,7 +624,7 @@ class CustomApi{
618
 
619
  public function generateAccessToken($access_token, $refresh_token) {
620
  $url = "https://www.googleapis.com/oauth2/v1/tokeninfo?=" . $access_token;
621
- $request = wp_remote_get(esc_url_raw($url), array("access_token"=>$access_token));
622
  $response_code = wp_remote_retrieve_response_code($request);
623
 
624
  $response_message = wp_remote_retrieve_response_message($request);
@@ -638,6 +644,7 @@ class CustomApi{
638
  'refresh_token' => sanitize_text_field($refresh_token),
639
  ];
640
  $args = array(
 
641
  'headers' =>$header,
642
  'method' => 'POST',
643
  'body' => $data
@@ -713,6 +720,7 @@ class CustomApi{
713
  ];
714
 
715
  $args = array(
 
716
  'headers' =>$header,
717
  'method' => 'POST',
718
  'body' => wp_json_encode($data)
123
  }
124
  }
125
  $args = array(
126
+ 'timeout' => 10000,
127
  'headers' => array(
128
  'Authorization' => "Bearer $this->token",
129
  'Content-Type' => 'application/json'
204
  'subscription_id'=>sanitize_text_field($subscription_id)
205
  ];
206
  $args = array(
207
+ 'timeout' => 10000,
208
  'headers' =>$header,
209
  'method' => 'POST',
210
  'body' => wp_json_encode($data)
287
  'customer_id' => sanitize_text_field($customer_id)
288
  ];
289
  $args = array(
290
+ 'timeout' => 10000,
291
  'headers' =>$header,
292
  'method' => 'POST',
293
  'body' => wp_json_encode($data)
415
  $url = $this->apiDomain . '/gmc/gmc-category-mapping';
416
 
417
  $args = array(
418
+ 'timeout' => 10000,
419
  'headers' => array(
420
  'Authorization' => "Bearer $this->token",
421
  'Content-Type' => 'application/json'
457
  $url = $this->apiDomain . '/gmc/gmc-attribute-mapping';
458
 
459
  $args = array(
460
+ 'timeout' => 10000,
461
  'headers' => array(
462
  'Authorization' => "Bearer $this->token",
463
  'Content-Type' => 'application/json'
590
  $url = $this->apiDomain . '/campaigns/currency-symbol';
591
 
592
  $args = array(
593
+ 'timeout' => 10000,
594
  'headers' => array(
595
  'Authorization' => "Bearer $this->token",
596
  'Content-Type' => 'application/json'
624
 
625
  public function generateAccessToken($access_token, $refresh_token) {
626
  $url = "https://www.googleapis.com/oauth2/v1/tokeninfo?=" . $access_token;
627
+ $request = wp_remote_get(esc_url_raw($url), array("access_token" => $access_token, 'timeout' => 10000));
628
  $response_code = wp_remote_retrieve_response_code($request);
629
 
630
  $response_message = wp_remote_retrieve_response_message($request);
644
  'refresh_token' => sanitize_text_field($refresh_token),
645
  ];
646
  $args = array(
647
+ 'timeout' => 10000,
648
  'headers' =>$header,
649
  'method' => 'POST',
650
  'body' => $data
720
  ];
721
 
722
  $args = array(
723
+ 'timeout' => 10000,
724
  'headers' =>$header,
725
  'method' => 'POST',
726
  'body' => wp_json_encode($data)
includes/setup/ShoppingApi.php CHANGED
@@ -27,6 +27,7 @@ class ShoppingApi {
27
  'customer_id' => sanitize_text_field($this->customerId)
28
  ];
29
  $args = array(
 
30
  'headers' => array(
31
  'Authorization' => "Bearer $this->token",
32
  'Content-Type' => 'application/json'
27
  'customer_id' => sanitize_text_field($this->customerId)
28
  ];
29
  $args = array(
30
+ 'timeout' => 10000,
31
  'headers' => array(
32
  'Authorization' => "Bearer $this->token",
33
  'Content-Type' => 'application/json'
readme.txt CHANGED
@@ -8,8 +8,8 @@ Author: Tatvic
8
  Requires at least: 3.5.0
9
  Tested up to: 5.8.2
10
  Requires PHP: 5.6 or Higher
11
- Stable tag: 4.5.9
12
- Version: 4.5.9
13
  License: GPLv3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
 
@@ -380,6 +380,11 @@ You can resolve the duplication of data by removing the manually implemented GA
380
 
381
  == Changelog ==
382
 
 
 
 
 
 
383
  = 4.5.9 - 17/01/2022 =
384
 
385
  * In this release we updated the Google Ads reports like Campaign performance, Smart Shopping and Product Performance & Product Partition.
8
  Requires at least: 3.5.0
9
  Tested up to: 5.8.2
10
  Requires PHP: 5.6 or Higher
11
+ Stable tag: 4.6.0
12
+ Version: 4.6.0
13
  License: GPLv3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
 
380
 
381
  == Changelog ==
382
 
383
+ = 4.6.0 - 26/01/2022 =
384
+
385
+ * In this release, bug fixed and performance improvement.
386
+ * We have fixed the onboarding issue which was raised by some users.
387
+
388
  = 4.5.9 - 17/01/2022 =
389
 
390
  * In this release we updated the Google Ads reports like Campaign performance, Smart Shopping and Product Performance & Product Partition.