Enhanced Ecommerce Google Analytics Plugin for WooCommerce - Version 4.6.4

Version Description

  • 12/02/2022 =

  • New: With our New Feedback feature on Dashboard ,user can now share the feedback about the plugin

  • Tweak: We enhance the Product Sync feature wher user can choose the batch size for product sync

  • Fix -We fixed the import products from GMC

Download this release

Release Info

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

Code changes from version 4.6.3 to 4.6.4

admin/class-tvc-admin-helper.php CHANGED
@@ -177,10 +177,34 @@ Class TVC_Admin_Helper{
177
  $this->set_ee_options_data($get_ee_options_data);
178
  }
179
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  /*
181
  * Update user subscription and shopping details in DB
182
  */
183
- public function set_update_api_to_db($googleDetail = null, $is_import_gmc_products = true){
184
  //if(empty($googleDetail)){
185
  $google_detail = $this->customApiObj->getGoogleAnalyticDetail();
186
  if(property_exists($google_detail,"error") && $google_detail->error == false){
@@ -193,24 +217,8 @@ Class TVC_Admin_Helper{
193
  return array("error"=>true, "message"=>esc_html__("Please try after some time.","conversios"));
194
  }
195
  //}
196
- $syncProductStat = [];
197
- $syncProductList = [];
198
- $campaigns_list = [];
199
- if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != ""){
200
- if($is_import_gmc_products){
201
- $this->import_gmc_products_sync_in_db();
202
- }
203
- $product_status = $this->TVC_Admin_DB_Helper->tvc_get_counts_groupby('ee_products_sync_list','google_status');
204
- $syncProductStat = array("approved" => 0, "disapproved" => 0, "pending" => 0 );
205
- foreach ($product_status as $key => $value) {
206
- if(isset($value['google_status']) ){
207
- $syncProductStat[$value['google_status']] = (isset($value['count']) && $value['count'] >0)?$value['count']:0;
208
- }
209
- }
210
- $syncProductStat["total"] = $this->TVC_Admin_DB_Helper->tvc_row_count('ee_products_sync_list');
211
- }else{
212
- $syncProductStat = array("total" =>0, "approved" => 0, "disapproved" => 0, "pending" => 0 );
213
- }
214
  if(isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != ""){
215
  $this->update_remarketing_snippets();
216
  $shopping_api = new ShoppingApi();
@@ -221,8 +229,13 @@ Class TVC_Admin_Helper{
221
  }
222
  }
223
  }
224
-
225
- $this->set_ee_options_data(array("setting" => $googleDetail, "prod_sync_status" => (object) $syncProductStat, "campaigns_list"=>$campaigns_list, "sync_time"=>current_time( 'timestamp' )));
 
 
 
 
 
226
  return array("error"=>false, "message"=>esc_html__("Details updated successfully.","conversios"));
227
  }
228
  /*
@@ -280,19 +293,23 @@ Class TVC_Admin_Helper{
280
  */
281
  public function import_gmc_products_sync_in_db($next_page_token = null){
282
  $merchant_id = $this->get_merchantId();
283
- $last_row = $this->TVC_Admin_DB_Helper->tvc_get_last_row('ee_products_sync_list',array("gmc_id"));
284
- /**
285
- * truncate table before import the GMC products
286
- */
287
- if(!empty($last_row) && isset($last_row['gmc_id']) && $last_row['gmc_id'] != $merchant_id){
288
- global $wpdb;
289
- $tablename = $wpdb->prefix ."ee_products_sync_list";
290
- $this->TVC_Admin_DB_Helper->tvc_safe_truncate_table($tablename);
291
- $tablename = $wpdb->prefix ."ee_product_sync_data";
292
- $this->TVC_Admin_DB_Helper->tvc_safe_truncate_table($tablename);
293
- $tablename = $wpdb->prefix ."ee_product_sync_call";
294
- $this->TVC_Admin_DB_Helper->tvc_safe_truncate_table($tablename);
295
- }else if( $next_page_token =="" ){
 
 
 
 
296
  global $wpdb;
297
  $tablename = $wpdb->prefix ."ee_products_sync_list";
298
  $this->TVC_Admin_DB_Helper->tvc_safe_truncate_table($tablename);
@@ -328,9 +345,10 @@ Class TVC_Admin_Helper{
328
  }
329
  }
330
  }
331
- if($rs_next_page_token!=""){
 
332
  $this->import_gmc_products_sync_in_db($rs_next_page_token);
333
- }
334
  }
335
  }
336
  }
177
  $this->set_ee_options_data($get_ee_options_data);
178
  }
179
  }
180
+ /*
181
+ * Update Google shopping product details in DB
182
+ */
183
+ public function update_gmc_product_to_db($next_page_token =""){
184
+ $merchantId = $this->get_merchantId();
185
+ //$google_detail = $this->customApiObj->getGoogleAnalyticDetail();
186
+ $syncProductStat = array("total" =>0, "approved" => 0, "disapproved" => 0, "pending" => 0 );
187
+ if( $merchantId != ""){
188
+ $api_rs = $this->import_gmc_products_sync_in_db($next_page_token);
189
+ if( $api_rs["next_page_token"] == "" ){
190
+ $product_status = $this->TVC_Admin_DB_Helper->tvc_get_counts_groupby('ee_products_sync_list','google_status');
191
+ foreach ($product_status as $key => $value) {
192
+ if(isset($value['google_status']) ){
193
+ $syncProductStat[$value['google_status']] = (isset($value['count']) && $value['count'] >0)?$value['count']:0;
194
+ }
195
+ }
196
+ $syncProductStat["total"] = $this->TVC_Admin_DB_Helper->tvc_row_count('ee_products_sync_list');
197
+ $google_detail = $this->get_ee_options_data();
198
+ $google_detail["prod_sync_status"] = (object) $syncProductStat;
199
+ $this->set_ee_options_data($google_detail);
200
+ }
201
+ return array( "error"=>false, "api_rs"=>$api_rs, "message"=>esc_html__("Details updated successfully.","conversios") );
202
+ }
203
+ }
204
  /*
205
  * Update user subscription and shopping details in DB
206
  */
207
+ public function set_update_api_to_db($googleDetail = null){
208
  //if(empty($googleDetail)){
209
  $google_detail = $this->customApiObj->getGoogleAnalyticDetail();
210
  if(property_exists($google_detail,"error") && $google_detail->error == false){
217
  return array("error"=>true, "message"=>esc_html__("Please try after some time.","conversios"));
218
  }
219
  //}
220
+
221
+ $campaigns_list = "";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  if(isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != ""){
223
  $this->update_remarketing_snippets();
224
  $shopping_api = new ShoppingApi();
229
  }
230
  }
231
  }
232
+ $syncProductStat = array("total" =>0, "approved" => 0, "disapproved" => 0, "pending" => 0 );
233
+ $google_detail_t = $this->get_ee_options_data();
234
+ //print_r($google_detail_t);
235
+ $prod_sync_status = isset($google_detail_t["prod_sync_status"])?$google_detail_t["prod_sync_status"]:$syncProductStat;
236
+ //print_r($prod_sync_status);
237
+ //exit;
238
+ $this->set_ee_options_data(array("setting" => $googleDetail, "prod_sync_status" => (object) $prod_sync_status, "campaigns_list"=>$campaigns_list, "sync_time"=>current_time( 'timestamp' )));
239
  return array("error"=>false, "message"=>esc_html__("Details updated successfully.","conversios"));
240
  }
241
  /*
293
  */
294
  public function import_gmc_products_sync_in_db($next_page_token = null){
295
  $merchant_id = $this->get_merchantId();
296
+ if( $next_page_token =="" ){
297
+ $last_row = $this->TVC_Admin_DB_Helper->tvc_get_last_row('ee_products_sync_list',array("gmc_id"));
298
+ /**
299
+ * truncate table before import the GMC products
300
+ */
301
+ if(!empty($last_row) && isset($last_row['gmc_id']) && $last_row['gmc_id'] != $merchant_id){
302
+ global $wpdb;
303
+ $tablename = $wpdb->prefix ."ee_products_sync_list";
304
+ $this->TVC_Admin_DB_Helper->tvc_safe_truncate_table($tablename);
305
+ $tablename = $wpdb->prefix ."ee_product_sync_data";
306
+ $this->TVC_Admin_DB_Helper->tvc_safe_truncate_table($tablename);
307
+ $tablename = $wpdb->prefix ."ee_product_sync_call";
308
+ $this->TVC_Admin_DB_Helper->tvc_safe_truncate_table($tablename);
309
+ }
310
+ }
311
+
312
+ if( $next_page_token =="" ){
313
  global $wpdb;
314
  $tablename = $wpdb->prefix ."ee_products_sync_list";
315
  $this->TVC_Admin_DB_Helper->tvc_safe_truncate_table($tablename);
345
  }
346
  }
347
  }
348
+ return array( "sync_product" => count($sync_product_list), "next_page_token" => $rs_next_page_token );
349
+ /*if($rs_next_page_token!=""){
350
  $this->import_gmc_products_sync_in_db($rs_next_page_token);
351
+ }*/
352
  }
353
  }
354
  }
admin/css/style.css CHANGED
@@ -1,6 +1,8 @@
1
  @charset "utf-8";
2
  @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,500&display=swap');
3
  /*rc */
 
 
4
  .update-nag, .updated, .error, .is-dismissible, .notice { display: none !important; }
5
  .tvc-notice-error {
6
  display: block!important;
@@ -249,6 +251,14 @@ button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{b
249
  transition: background-color 0;
250
  background-size: 50px;
251
  }
 
 
 
 
 
 
 
 
252
  .dashbrdpage-wrap .loading-bg-effect img{display: none;}
253
  @keyframes gradient {
254
  0% {
@@ -1066,4 +1076,21 @@ button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{b
1066
  }
1067
  .ecomcheckoutfunchartinfo .chartpercarrow{
1068
  right: 14px;
1069
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  @charset "utf-8";
2
  @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,500&display=swap');
3
  /*rc */
4
+ .product_batch_size{position: relative; margin-top: 10px; float: right;}
5
+ .product_batch_size label{ margin-right: 23px;}
6
  .update-nag, .updated, .error, .is-dismissible, .notice { display: none !important; }
7
  .tvc-notice-error {
8
  display: block!important;
251
  transition: background-color 0;
252
  background-size: 50px;
253
  }
254
+ .pp-modal .is_loading{
255
+ background: rgba(255,255,255,0.65) url('../images/ajax-loader.gif') no-repeat 50% 50%;
256
+ -webkit-transition: background-color 0;
257
+ transition: background-color 0;
258
+ background-size: 50px;
259
+ opacity: 0.5;
260
+ cursor: not-allowed;
261
+ }
262
  .dashbrdpage-wrap .loading-bg-effect img{display: none;}
263
  @keyframes gradient {
264
  0% {
1076
  }
1077
  .ecomcheckoutfunchartinfo .chartpercarrow{
1078
  right: 14px;
1079
+ }
1080
+ /* feedback-form */
1081
+ #feedback-form-wrapper #feedback_record_btn > button { position: fixed;right: 0;top: 70%;transform: rotate(-90deg) translate(50%, -50%);transform-origin: right;z-index: 999;width: 150px;font-size: 19px; }
1082
+ #feedback-form-wrapper .rating-input-wrapper input[type="radio"] { display: none; }
1083
+ .rating-input-wrapper input[type="radio"] ~ span { cursor: pointer; }
1084
+ .rating-input-wrapper{ display: flex;flex-direction: row;justify-content: flex-start; }
1085
+ #feedback-form-wrapper .rating-input-wrapper input[type="radio"]:checked ~ span { background-color: #4261dc;color: #fff; }
1086
+ #feedback-form-wrapper .rating-labels > label{ font-size: 14px;color: #777; }
1087
+ .feedback-form-group label{ cursor: default; }
1088
+ .feedback_label{ margin: 18px 8px 18px 8px; }
1089
+ .feedback_options{ border: 1px solid #515151 !important;border-radius: 0.25rem !important;padding: 7px 15px; }
1090
+ .feedback_que_label{ text-align: left;padding: 6px; }
1091
+ .feedback_txtarea_div{ display: flex;flex-direction: column;justify-content: flex-start; }
1092
+ .feedback_txtarea{ margin: 0px 2px; }
1093
+ #charcount{ text-align: end;padding: 1px 0px;font-size: smaller;}
1094
+ .feedback_btn{ margin: 0;text-transform: none;-webkit-appearance: button;transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;border: 1px solid transparent; text-align: center;text-decoration: none;vertical-align: middle;display: inline-block; font-weight: 400; line-height: 1.5; color: #fff;border-radius: 0!important; padding: 0.375rem 1rem; background-color: #2D62ED;border-color: #2D62ED; }
1095
+ .feedback_btn:hover{ color: #fff; }
1096
+ /* end feedback-form */
admin/helper/class-onboarding-helper.php CHANGED
@@ -362,7 +362,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
362
  /*
363
  * function call for save API data in WP DB
364
  */
365
- $TVC_Admin_Helper->set_update_api_to_db($googleDetail, false);
366
 
367
  /**
368
  * function call for save remarketing snippets in WP DB
@@ -449,7 +449,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
449
  /**
450
  * function call for save API data in WP DB
451
  */
452
- $TVC_Admin_Helper->set_update_api_to_db($googleDetail, false);
453
  }
454
  /**
455
  * update contact details on sendinblue.
362
  /*
363
  * function call for save API data in WP DB
364
  */
365
+ $TVC_Admin_Helper->set_update_api_to_db($googleDetail);
366
 
367
  /**
368
  * function call for save remarketing snippets in WP DB
449
  /**
450
  * function call for save API data in WP DB
451
  */
452
+ $TVC_Admin_Helper->set_update_api_to_db($googleDetail);
453
  }
454
  /**
455
  * update contact details on sendinblue.
admin/partials/class-conversios-header.php CHANGED
@@ -20,6 +20,7 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
20
  add_action('add_conversios_header',array($this, 'header_notices'));
21
  add_action('add_conversios_header',array($this, 'conversios_header'));
22
  add_action('add_conversios_header',array($this, 'header_menu'));
 
23
  }
24
 
25
  /**
@@ -170,6 +171,130 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
170
  <?php
171
  }
172
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  }
174
  }
175
  new Conversios_Header();
20
  add_action('add_conversios_header',array($this, 'header_notices'));
21
  add_action('add_conversios_header',array($this, 'conversios_header'));
22
  add_action('add_conversios_header',array($this, 'header_menu'));
23
+ add_action('add_conversios_header',array($this, 'custom_feedback_form'));
24
  }
25
 
26
  /**
171
  <?php
172
  }
173
  }
174
+ /**
175
+ * custom_feedback_form
176
+ *
177
+ * @since 4.6.4
178
+ */
179
+ public function custom_feedback_form(){
180
+ if(isset($_GET['page']) && sanitize_text_field($_GET['page']) === "conversios"){
181
+ $this->TVC_Admin_Helper = new TVC_Admin_Helper();
182
+ $customerId = sanitize_text_field($this->TVC_Admin_Helper->get_api_customer_id());
183
+ $subscriptionId = sanitize_text_field($this->TVC_Admin_Helper->get_subscriptionId());
184
+ ?>
185
+ <div id="feedback-form-wrapper">
186
+ <div id="feedback_record_btn">
187
+ <button type="button" class="feedback_btn">
188
+ <?php esc_html_e("Feedback","conversios"); ?>
189
+ </button>
190
+ </div>
191
+ <div id="feedback_form_modal" class="pp-modal whitepopup">
192
+ <div class="sycnprdct-ppcnt">
193
+ <div class="ppwhitebg pp-content upgradsbscrptnpp-cntr" style="max-width: 545px !important;">
194
+ <div class="ppclsbtn absltpsclsbtn clsbtntrgr">
195
+ <img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/close-white.png'); ?>" alt="">
196
+ </div>
197
+ <div class="upgradsbscrptnpp-hdr">
198
+ <h5><?php esc_html_e("Your feedback is valuable","conversios"); ?></h5>
199
+ </div>
200
+ <div class="ppmodal-body">
201
+ <form id="customer_feedback_form">
202
+ <div class="feedback-form-group">
203
+ <label class="feedback_que_label" for="feedback_question_one"><?php esc_html_e("The Conversios plugin helps me to get more insight about business which helps me to take business decisions? *","conversios"); ?></label>
204
+ <div class="rating-input-wrapper">
205
+ <label class="feedback_label"><input name="feedback_question_one" type="radio" value="1" /><span class="feedback_options"><?php esc_html_e("Strongly Agree","conversios"); ?></span></label>
206
+ <label class="feedback_label"><input type="radio" name="feedback_question_one" value="2" /><span class="feedback_options"><?php esc_html_e("Agree","conversios"); ?></span></label>
207
+ <label class="feedback_label"><input type="radio" name="feedback_question_one" value="3" /><span class="feedback_options"><?php esc_html_e("Disagree","conversios"); ?></span></label>
208
+ <label class="feedback_label"><input type="radio" name="feedback_question_one" value="4" /><span class="feedback_options"><?php esc_html_e("Strongly Disagree","conversios"); ?></span></label>
209
+ </div>
210
+ </div>
211
+ <div class="feedback-form-group">
212
+ <label class="feedback_que_label" for="feedback_question_two"><?php esc_html_e("The Conversios plugin helps me to simplified the Google Ads and Google Merchant Centre? *","conversios"); ?></label>
213
+ <div class="rating-input-wrapper">
214
+ <label class="feedback_label"><input type="radio" name="feedback_question_two" value="1" /><span class="feedback_options"><?php esc_html_e("Strongly Agree","conversios"); ?></span></label>
215
+ <label class="feedback_label"><input type="radio" name="feedback_question_two" value="2" /><span class="feedback_options"><?php esc_html_e("Agree","conversios"); ?></span></label>
216
+ <label class="feedback_label"><input type="radio" name="feedback_question_two" value="3" /><span class="feedback_options"><?php esc_html_e("Disagree","conversios"); ?></span></label>
217
+ <label class="feedback_label"><input type="radio" name="feedback_question_two" value="4" /><span class="feedback_options"><?php esc_html_e("Strongly Disagree","conversios"); ?></span></label>
218
+ </div>
219
+ </div>
220
+ <div class="feedback-form-group feedback_txtarea_div">
221
+ <label class="feedback_que_label" for="feedback_question_three"><?php esc_html_e("You are satisfied with the Conversion plugin? *","conversios"); ?></label>
222
+ <div class="rating-input-wrapper">
223
+ <label class="feedback_label"><input type="radio" name="feedback_question_three" value="1" /><span class="feedback_options"><?php esc_html_e("Strongly Agree","conversios"); ?></span></label>
224
+ <label class="feedback_label"><input type="radio" name="feedback_question_three" value="2" /><span class="feedback_options"><?php esc_html_e("Agree","conversios"); ?></span></label>
225
+ <label class="feedback_label"><input type="radio" name="feedback_question_three" value="3" /><span class="feedback_options"><?php esc_html_e("Disagree","conversios"); ?></span></label>
226
+ <label class="feedback_label"><input type="radio" name="feedback_question_three" value="4" /><span class="feedback_options"><?php esc_html_e("Strongly Disagree","conversios"); ?></span></label>
227
+ </div>
228
+ </div>
229
+ <div class="feedback-form-group feedback_txtarea_div">
230
+ <label class="feedback_que_label" for="feedback_description"><?php esc_html_e("How could we make the Conversios plugin better for you?","conversios"); ?></label>
231
+ <textarea class="feedback_txtarea" id="feedback_description" onkeyup="feedback_charcountupdate(this.value)" rows="5" maxlength="300"></textarea><span id="charcount"></span>
232
+ </div>
233
+ <button id="submit_wooplugin_feedback" type="submit" class="blueupgrdbtn"><?php esc_html_e("Submit","conversios"); ?></button>
234
+ </form>
235
+ </div>
236
+ </div>
237
+ </div>
238
+ </div>
239
+ </div>
240
+ <script>
241
+ function feedback_charcountupdate(str) {
242
+ let lng = str.length;document.getElementById("charcount").innerHTML ='('+lng+'/300)';
243
+ }
244
+ jQuery(document).ready(function() {
245
+ feedback_charcountupdate($('#feedback_description').val());
246
+
247
+ jQuery("#feedback_record_btn").click(function(){
248
+ setTimeout(() => { $("#feedback_form_modal").addClass("showpopup"); }, 500);
249
+ });
250
+ jQuery( "#customer_feedback_form" ).submit(function( event ) {
251
+ event.preventDefault();
252
+ let val_que_one=$('input[name="feedback_question_one"]:checked').val();
253
+ if(val_que_one == "" || val_que_one == undefined ){
254
+ tvc_helper.tvc_alert("error","","Please answer the required questions"); return false;}
255
+ let val_que_two=$('input[name="feedback_question_two"]:checked').val();
256
+ if(val_que_two == "" || val_que_two == undefined ){ return false;}
257
+ let val_que_three=$('input[name="feedback_question_three"]:checked').val();
258
+ if(val_que_three == "" || val_que_three == undefined ){ return false;}
259
+ let feedback_description= $('#feedback_description').val();
260
+ let customer_id="<?php echo $customerId; ?>";
261
+ let subscription_id="<?php echo $subscriptionId; ?>";
262
+ let formdata = {
263
+ action: "tvc_call_add_customer_feedback",
264
+ que_one: val_que_one,
265
+ que_two: val_que_two,
266
+ que_three: val_que_three,
267
+ subscription_id: subscription_id,
268
+ customer_id: customer_id,
269
+ feedback_description: feedback_description
270
+ };
271
+ $.ajax({
272
+ type: "POST",
273
+ dataType: "json",
274
+ url: tvc_ajax_url,
275
+ data: formdata,
276
+ beforeSend: function(){
277
+ //tvc_helper.loaderSection(true);
278
+ $("#customer_feedback_form").addClass("is_loading");
279
+ },
280
+ success: function(response){
281
+ //console.log("response",response);
282
+ if (response?.error === false) {
283
+ tvc_helper.tvc_alert("success","",response.message);
284
+ }else{
285
+ tvc_helper.tvc_alert("error","",response.message);
286
+ }
287
+ $("#customer_feedback_form").removeClass("is_loading");
288
+ $("#feedback_form_modal").removeClass("showpopup");
289
+ }
290
+ });
291
+ });
292
+ });
293
+ </script>
294
+ <?php
295
+ }
296
+ }
297
+
298
  }
299
  }
300
  new Conversios_Header();
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.6.3
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.6.3' );
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.4
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.4' );
41
  $fullName = plugin_basename( __FILE__ );
42
  $dir = str_replace('/enhanced-ecommerce-google-analytics.php','',$fullName);
43
  if ( ! defined( 'ENHANCAD_PLUGIN_NAME' ) ) {
includes/data/class-tvc-ajax-file.php CHANGED
@@ -30,6 +30,7 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
30
  add_action('wp_ajax_tvcajax-store-time-taken', array($this, 'tvcajax_store_time_taken'));
31
 
32
  add_action('wp_ajax_tvc_call_api_sync', array($this, 'tvc_call_api_sync'));
 
33
  add_action('wp_ajax_tvc_call_domain_claim', array($this, 'tvc_call_domain_claim'));
34
  add_action('wp_ajax_tvc_call_site_verified', array($this, 'tvc_call_site_verified'));
35
  add_action('wp_ajax_tvc_call_notice_dismiss', array($this, 'tvc_call_notice_dismiss'));
@@ -37,6 +38,8 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
37
  add_action('wp_ajax_tvc_call_active_licence', array($this, 'tvc_call_active_licence'));
38
  add_action('wp_ajax_tvc_call_add_survey', array($this, 'tvc_call_add_survey'));
39
 
 
 
40
  add_action('wp_ajax_tvcajax_product_sync_bantch_wise', array($this, 'tvcajax_product_sync_bantch_wise'));
41
  }
42
 
@@ -46,7 +49,8 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
46
  // barch size for inser data in DB
47
  $product_db_batch_size = 100;
48
  // barch size for inser product in GMC
49
- $product_batch_size = 25;
 
50
  if(!class_exists('CustomApi')){
51
  include(ENHANCAD_PLUGIN_DIR . 'includes/setup/CustomApi.php');
52
  }
@@ -197,7 +201,7 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
197
  if(isset($rs['products_sync'])){
198
  $sync_produt = (int)$sync_produt + $rs['products_sync'];
199
  }else{
200
- echo json_encode(array('status'=>'false', 'message'=> $rs['message']));
201
  exit;
202
  }
203
  $skip_products=(isset($rs['skip_products']))?$rs['skip_products']:0;
@@ -216,10 +220,26 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
216
  }
217
  $sync_produt_p = round($sync_produt_p,0);
218
  $sync_progressive_data = array("sync_step"=>$sync_step, "total_product"=>$total_product, "sync_produt"=>$sync_produt, "sync_produt_p"=>$sync_produt_p, 'skip_products'=>$skip_products, "last_sync_product_id"=>$last_sync_product_id, "is_synced_up"=>$is_synced_up, "sync_message"=>$sync_message);
219
- echo json_encode(array('status'=>'success', "sync_progressive_data" => $sync_progressive_data,"api_rs"=>$rs));
220
  exit;
221
  }
222
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
223
  public function tvc_call_add_survey(){
224
  if ( is_admin() ) {
225
  if(!class_exists('CustomApi')){
@@ -290,6 +310,21 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
290
  }
291
  exit;
292
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  public function tvc_call_api_sync(){
294
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'apiSyncupNonce'), 'tvc_call_api_sync-nonce')){
295
  $TVC_Admin_Helper = new TVC_Admin_Helper();
30
  add_action('wp_ajax_tvcajax-store-time-taken', array($this, 'tvcajax_store_time_taken'));
31
 
32
  add_action('wp_ajax_tvc_call_api_sync', array($this, 'tvc_call_api_sync'));
33
+ add_action('wp_ajax_tvc_call_import_gmc_product', array($this, 'tvc_call_import_gmc_product'));
34
  add_action('wp_ajax_tvc_call_domain_claim', array($this, 'tvc_call_domain_claim'));
35
  add_action('wp_ajax_tvc_call_site_verified', array($this, 'tvc_call_site_verified'));
36
  add_action('wp_ajax_tvc_call_notice_dismiss', array($this, 'tvc_call_notice_dismiss'));
38
  add_action('wp_ajax_tvc_call_active_licence', array($this, 'tvc_call_active_licence'));
39
  add_action('wp_ajax_tvc_call_add_survey', array($this, 'tvc_call_add_survey'));
40
 
41
+ add_action('wp_ajax_tvc_call_add_customer_feedback', array($this, 'tvc_call_add_customer_feedback'));
42
+
43
  add_action('wp_ajax_tvcajax_product_sync_bantch_wise', array($this, 'tvcajax_product_sync_bantch_wise'));
44
  }
45
 
49
  // barch size for inser data in DB
50
  $product_db_batch_size = 100;
51
  // barch size for inser product in GMC
52
+ //$product_batch_size = 25;
53
+ $product_batch_size = isset($_POST['product_batch_size'])?sanitize_text_field($_POST['product_batch_size']):"25";
54
  if(!class_exists('CustomApi')){
55
  include(ENHANCAD_PLUGIN_DIR . 'includes/setup/CustomApi.php');
56
  }
201
  if(isset($rs['products_sync'])){
202
  $sync_produt = (int)$sync_produt + $rs['products_sync'];
203
  }else{
204
+ echo json_encode(array('status'=>'false', 'message'=> $rs['message'], "api_rs"=>$rs));
205
  exit;
206
  }
207
  $skip_products=(isset($rs['skip_products']))?$rs['skip_products']:0;
220
  }
221
  $sync_produt_p = round($sync_produt_p,0);
222
  $sync_progressive_data = array("sync_step"=>$sync_step, "total_product"=>$total_product, "sync_produt"=>$sync_produt, "sync_produt_p"=>$sync_produt_p, 'skip_products'=>$skip_products, "last_sync_product_id"=>$last_sync_product_id, "is_synced_up"=>$is_synced_up, "sync_message"=>$sync_message);
223
+ echo json_encode(array('status'=>'success', "sync_progressive_data" => $sync_progressive_data, "api_rs"=>$rs));
224
  exit;
225
  }
226
+ public function tvc_call_add_customer_feedback(){
227
+ if( isset($_POST['que_one']) && isset($_POST['que_two']) && isset($_POST['que_three']) ){
228
+ $formdata = array();
229
+ $formdata['business_insights_index'] = sanitize_text_field($_POST['que_one']);
230
+ $formdata['automate_integrations_index'] = sanitize_text_field($_POST['que_two']);
231
+ $formdata['business_scalability_index'] = sanitize_text_field($_POST['que_three']);
232
+ $formdata['subscription_id'] = isset($_POST['subscription_id'])?sanitize_text_field($_POST['subscription_id']):"";
233
+ $formdata['customer_id'] = isset($_POST['customer_id'])?sanitize_text_field($_POST['customer_id']):"";
234
+ $formdata['feedback'] = isset($_POST['feedback_description'])?sanitize_text_field($_POST['feedback_description']):"";
235
+ $customObj = new CustomApi();
236
+ unset($_POST['action']);
237
+ echo json_encode($customObj->record_customer_feedback($formdata));
238
+ exit;
239
+ }else{
240
+ echo json_encode(array("error"=>true, "message" => esc_html__("Please answer the required questions","conversios") ));
241
+ }
242
+ }
243
  public function tvc_call_add_survey(){
244
  if ( is_admin() ) {
245
  if(!class_exists('CustomApi')){
310
  }
311
  exit;
312
  }
313
+ public function tvc_call_import_gmc_product(){
314
+ if($this->safe_ajax_call(filter_input(INPUT_POST, 'apiSyncupNonce'), 'tvc_call_api_sync-nonce')){
315
+ $next_page_token = isset($_POST['next_page_token'])?sanitize_text_field($_POST['next_page_token']):"";
316
+ $TVC_Admin_Helper = new TVC_Admin_Helper();
317
+ $api_rs = $TVC_Admin_Helper->update_gmc_product_to_db($next_page_token);
318
+ //print_r($api_rs);
319
+ if( isset($api_rs['error']) ){
320
+ echo json_encode($api_rs);
321
+ }else{
322
+ echo json_encode(array('error' => true, 'message' => esc_html__("Please try after some time.","conversios")));
323
+ }
324
+ exit;
325
+ }
326
+ exit;
327
+ }
328
  public function tvc_call_api_sync(){
329
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'apiSyncupNonce'), 'tvc_call_api_sync-nonce')){
330
  $TVC_Admin_Helper = new TVC_Admin_Helper();
includes/setup/CustomApi.php CHANGED
@@ -522,6 +522,7 @@ class CustomApi{
522
  return $return;
523
  }else{
524
  $return->error = true;
 
525
  foreach($response->errors as $err){
526
  $return->message = $err;
527
  break;
@@ -540,7 +541,7 @@ class CustomApi{
540
  }
541
  }
542
  $url = $this->apiDomain . "/products/list";
543
- $postData["maxResults"] = 25;
544
  $args = array(
545
  'timeout' => 10000,
546
  'headers' => array(
@@ -622,6 +623,38 @@ class CustomApi{
622
  }
623
  }
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));
522
  return $return;
523
  }else{
524
  $return->error = true;
525
+ $return->arges = $args;
526
  foreach($response->errors as $err){
527
  $return->message = $err;
528
  break;
541
  }
542
  }
543
  $url = $this->apiDomain . "/products/list";
544
+ $postData["maxResults"] = 50;
545
  $args = array(
546
  'timeout' => 10000,
547
  'headers' => array(
623
  }
624
  }
625
 
626
+ public function record_customer_feedback($postData){
627
+ try {
628
+ $url = $this->apiDomain . '/customerfeedback';
629
+ $args = array(
630
+ 'timeout' => 10000,
631
+ 'headers' => array(
632
+ 'Authorization' => "Bearer MTIzNA==",
633
+ 'Content-Type' => 'application/json',
634
+ 'AccessToken' => $this->generateAccessToken($this->get_tvc_access_token(), $this->get_tvc_refresh_token())
635
+ ),
636
+ 'body' => wp_json_encode($postData)
637
+ );
638
+ $request = wp_remote_post(esc_url_raw($url), $args);
639
+ // Retrieve information
640
+ $response_code = wp_remote_retrieve_response_code($request);
641
+ $response_message = wp_remote_retrieve_response_message($request);
642
+ $result = json_decode(wp_remote_retrieve_body($request));
643
+ $return = new \stdClass();
644
+ if ((isset($result->error) && $result->error == '')) {
645
+ $return->message = "Your feedback was successfully recoded.";
646
+ $return->error = false;
647
+ return $return;
648
+ }else{
649
+ $return->error = true;
650
+ $return->errors = $result->errors;
651
+ return $return;
652
+ }
653
+ } catch (Exception $e) {
654
+ return $e->getMessage();
655
+ }
656
+ }
657
+
658
  public function generateAccessToken($access_token, $refresh_token) {
659
  $url = "https://www.googleapis.com/oauth2/v1/tokeninfo?=" . $access_token;
660
  $request = wp_remote_get(esc_url_raw($url), array("access_token" => $access_token, 'timeout' => 10000));
includes/setup/class-tvc-product-sync-helper.php CHANGED
@@ -76,7 +76,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
76
  /*
77
  * careate products object for product sync
78
  */
79
- public function tvc_get_map_product_attribute($products, $tvc_currency, $merchantId){
80
  if(!empty($products)){
81
  $items = [];
82
  $skipProducts = [];
@@ -96,6 +96,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
96
  if(empty($products)){
97
  return array("error"=>true,"message"=>esc_html__("Products not found.","conversios"));
98
  }
 
99
  foreach ($products as $postkey => $postvalue) {
100
  $product_ids[] = $postvalue->w_product_id;
101
  $postmeta = [];
@@ -305,8 +306,13 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
305
  ];
306
  $items[] = $item;
307
  }
 
 
 
 
 
308
  }
309
- return array('error'=>false, 'items' => $items, 'skip_products'=> $skipProducts, 'product_ids'=>$product_ids);
310
  }
311
  }
312
  /*
@@ -335,7 +341,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
335
  $products = $wpdb->get_results( $wpdb->prepare("select * from `$tablename` where `id` > %d LIMIT %d", $last_sync_product_id, $product_batch_size), OBJECT);
336
  $entries = [];
337
  if(!empty($products)){
338
- $p_map_attribute = $this->tvc_get_map_product_attribute($products, $tvc_currency, $merchantId);
339
  if(!empty($p_map_attribute) && isset($p_map_attribute['items']) && !empty($p_map_attribute['items'])){
340
  // call product sync API
341
  $data = [
@@ -346,13 +352,15 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
346
  ];
347
  $response = $CustomApi->products_sync($data);
348
 
349
- $last_sync_product_id =end($products)->id;
 
350
  if($response->error== false){
351
  //"data"=> $p_map_attribute['items']
352
- $products_sync =count($products);
353
- return array('error'=> false, 'products_sync' => $products_sync, 'skip_products' => $p_map_attribute['skip_products'], 'last_sync_product_id' => $last_sync_product_id);
 
354
  }else{
355
- return array('error'=> true, 'message' => esc_attr($response->message) );
356
  }
357
  // End call product sync API
358
  $sync_product_ids = (isset($p_map_attribute['product_ids']))?$p_map_attribute['product_ids']:"";
@@ -469,7 +477,20 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
469
  </div>';
470
  }?>
471
  </div>
472
-
 
 
 
 
 
 
 
 
 
 
 
 
 
473
  </section>
474
  </form>
475
  </div>
@@ -566,6 +587,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
566
  customer_id: '<?php echo esc_attr($this->currentCustomerId); ?>',
567
  subscription_id: '<?php echo esc_attr($this->subscriptionId); ?>',
568
  tvc_data: jQuery("#productSync").serialize(),
 
569
  sync_progressive_data:sync_progressive_data
570
  }
571
  $.ajax({
@@ -576,8 +598,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
576
  beforeSend: function(){
577
  },
578
  success: function(response){
579
- console.log(response);
580
-
581
  jQuery("#feed-spinner").css("display", "none");
582
  if(response.status == "success"){
583
  //var rs = JSON.parse(response);
76
  /*
77
  * careate products object for product sync
78
  */
79
+ public function tvc_get_map_product_attribute($products, $tvc_currency, $merchantId, $product_batch_size = 100){
80
  if(!empty($products)){
81
  $items = [];
82
  $skipProducts = [];
96
  if(empty($products)){
97
  return array("error"=>true,"message"=>esc_html__("Products not found.","conversios"));
98
  }
99
+ $products_sync = 0;
100
  foreach ($products as $postkey => $postvalue) {
101
  $product_ids[] = $postvalue->w_product_id;
102
  $postmeta = [];
306
  ];
307
  $items[] = $item;
308
  }
309
+
310
+ $products_sync++;
311
+ if(count($items) >= $product_batch_size){
312
+ return array('error'=>false, 'items' => $items, 'skip_products'=> $skipProducts, 'product_ids'=>$product_ids, 'last_sync_product_id'=> $postvalue->id, 'products_sync' => $products_sync);
313
+ }
314
  }
315
+ return array('error'=>false, 'items' => $items, 'skip_products'=> $skipProducts, 'product_ids'=>$product_ids, 'last_sync_product_id'=> $postvalue->id, 'products_sync' => $products_sync);
316
  }
317
  }
318
  /*
341
  $products = $wpdb->get_results( $wpdb->prepare("select * from `$tablename` where `id` > %d LIMIT %d", $last_sync_product_id, $product_batch_size), OBJECT);
342
  $entries = [];
343
  if(!empty($products)){
344
+ $p_map_attribute = $this->tvc_get_map_product_attribute($products, $tvc_currency, $merchantId, $product_batch_size);
345
  if(!empty($p_map_attribute) && isset($p_map_attribute['items']) && !empty($p_map_attribute['items'])){
346
  // call product sync API
347
  $data = [
352
  ];
353
  $response = $CustomApi->products_sync($data);
354
 
355
+ //$last_sync_product_id =end($products)->id;
356
+ $last_sync_product_id = $p_map_attribute['last_sync_product_id'];
357
  if($response->error== false){
358
  //"data"=> $p_map_attribute['items']
359
+ //$products_sync =count($products);
360
+ $products_sync = $p_map_attribute['products_sync'];
361
+ return array('error'=> false, 'products_sync' => $products_sync, 'skip_products' => $p_map_attribute['skip_products'], 'last_sync_product_id' => $last_sync_product_id, "products" => $products, "p_map_attribute" => $p_map_attribute );
362
  }else{
363
+ return array('error'=> true, 'message' => esc_attr($response->message) , "products" => $products, "p_map_attribute" => $p_map_attribute);
364
  }
365
  // End call product sync API
366
  $sync_product_ids = (isset($p_map_attribute['product_ids']))?$p_map_attribute['product_ids']:"";
477
  </div>';
478
  }?>
479
  </div>
480
+ <div class="product_batch_size">
481
+ <label>Product batch size
482
+ <div class="tvc-tooltip">
483
+ <span class="tvc-tooltiptext tvc-tooltip-right">if you are an issue in product sync with the current batch size then dicrease the batch size.</span>
484
+ <img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
485
+ </div>:
486
+ </label>
487
+ <select id="product_batch_size">
488
+ <option value="10">10</option>
489
+ <option value="25">25</option>
490
+ <option selected="selected" value="50">50</option>
491
+ <option value="100">100</option>
492
+ </select>
493
+ </div>
494
  </section>
495
  </form>
496
  </div>
587
  customer_id: '<?php echo esc_attr($this->currentCustomerId); ?>',
588
  subscription_id: '<?php echo esc_attr($this->subscriptionId); ?>',
589
  tvc_data: jQuery("#productSync").serialize(),
590
+ product_batch_size: jQuery("#product_batch_size").val(),
591
  sync_progressive_data:sync_progressive_data
592
  }
593
  $.ajax({
598
  beforeSend: function(){
599
  },
600
  success: function(response){
601
+ //console.log(response);
 
602
  jQuery("#feed-spinner").css("display", "none");
603
  if(response.status == "success"){
604
  //var rs = JSON.parse(response);
includes/setup/google-shopping-feed-sync-product.php CHANGED
@@ -82,10 +82,10 @@ public function create_form(){
82
  <div class="tvc-api-sunc">
83
  <span>
84
  <?php if($last_api_sync_up){
85
- echo esc_html__("Details last synced at","conversios").esc_attr($last_api_sync_up);
86
  }else{
87
  echo esc_html__("Refresh sync up","conversios");
88
- }?></span><img id="refresh_api" onclick="call_tvc_api_sync_up();" src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/refresh.png'); ?>">
89
  </div>
90
  <?php } ?>
91
  <?php echo get_google_shopping_tabs_html(esc_attr($this->site_url),(isset($googleDetail->google_merchant_center_id))?esc_attr($googleDetail->google_merchant_center_id):""); ?>
@@ -231,17 +231,30 @@ function call_tvc_api_sync_up(){
231
  $("#refresh_api").css("visibility","hidden");
232
  $(tvs_this).after('<div class="tvc-nb-spinner" id="tvc-nb-spinner"></div>');
233
  tvc_helper.tvc_alert("error","<?php esc_html_e("Attention !","conversios"); ?>", "<?php esc_html_e("Sync up is in the process do not refresh the page. it may take few minutes, if GMC product sync count is large.","conversios"); ?>");
 
 
 
 
234
  jQuery.post(tvc_ajax_url,{
235
- action: "tvc_call_api_sync"
236
  },function( response ){
237
- var rsp = JSON.parse(response);
238
- if(rsp.error == false){
239
- $("#tvc-nb-spinner").remove();
240
- tvc_helper.tvc_alert("success","",rsp.message,true,2000);
 
 
 
 
 
 
 
 
241
  }else{
242
- tvc_helper.tvc_alert("error","",rsp.message,true,2000);
 
243
  }
244
- setTimeout(function(){ location.reload();}, 2000);
245
  });
246
  }
247
  </script>
82
  <div class="tvc-api-sunc">
83
  <span>
84
  <?php if($last_api_sync_up){
85
+ echo esc_html__("Merchant center products details last synced at ","conversios").esc_attr($last_api_sync_up);
86
  }else{
87
  echo esc_html__("Refresh sync up","conversios");
88
+ }?>.</span><span id="products_count"></span><img id="refresh_api" onclick="call_tvc_api_sync_up();" src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/refresh.png'); ?>">
89
  </div>
90
  <?php } ?>
91
  <?php echo get_google_shopping_tabs_html(esc_attr($this->site_url),(isset($googleDetail->google_merchant_center_id))?esc_attr($googleDetail->google_merchant_center_id):""); ?>
231
  $("#refresh_api").css("visibility","hidden");
232
  $(tvs_this).after('<div class="tvc-nb-spinner" id="tvc-nb-spinner"></div>');
233
  tvc_helper.tvc_alert("error","<?php esc_html_e("Attention !","conversios"); ?>", "<?php esc_html_e("Sync up is in the process do not refresh the page. it may take few minutes, if GMC product sync count is large.","conversios"); ?>");
234
+ ImportGMCProduct();
235
+ }
236
+ var total_import = 0;
237
+ function ImportGMCProduct(next_page_token = null){
238
  jQuery.post(tvc_ajax_url,{
239
+ action: "tvc_call_import_gmc_product", next_page_token:next_page_token
240
  },function( response ){
241
+ var rsp = JSON.parse(response);
242
+ //console.log(rsp);
243
+ if(rsp.error == false && rsp.api_rs.next_page_token != "" ){
244
+ total_import = total_import+rsp.api_rs.sync_product;
245
+ if(rsp.api_rs.next_page_token != null){
246
+ $("#products_count").html("- "+total_import);
247
+ ImportGMCProduct(rsp.api_rs.next_page_token);
248
+ }else{
249
+ $("#tvc-nb-spinner").remove();
250
+ tvc_helper.tvc_alert("success","",rsp.message,true,3000);
251
+ setTimeout(function(){ location.reload();}, 3000);
252
+ }
253
  }else{
254
+ tvc_helper.tvc_alert("error","",rsp.message,true,3000);
255
+ setTimeout(function(){ location.reload();}, 2000);
256
  }
257
+
258
  });
259
  }
260
  </script>
includes/setup/google-shopping-feed.php CHANGED
@@ -300,7 +300,7 @@ class GoogleShoppingFeed {
300
  $("#tvc_msg").remove();
301
  $("#refresh_api").css("visibility","hidden");
302
  $(tvs_this).after('<div class="tvc-nb-spinner" id="tvc-nb-spinner"></div>');
303
- tvc_helper.tvc_alert("error","<?php esc_html_e("Attention !","conversios"); ?>","<?php esc_html_e("Sync up is in the process do not refresh the page. it may take few minutes, if GMC product sync count is large.","conversios"); ?>");
304
  jQuery.post(tvc_ajax_url,{
305
  action: "tvc_call_api_sync"
306
  },function( response ){
300
  $("#tvc_msg").remove();
301
  $("#refresh_api").css("visibility","hidden");
302
  $(tvs_this).after('<div class="tvc-nb-spinner" id="tvc-nb-spinner"></div>');
303
+ tvc_helper.tvc_alert("error","<?php esc_html_e("Attention !","conversios"); ?>","<?php esc_html_e("Sync up is in the process do not refresh the page. it may take few minutes.","conversios"); ?>");
304
  jQuery.post(tvc_ajax_url,{
305
  action: "tvc_call_api_sync"
306
  },function( response ){
readme.txt CHANGED
@@ -8,8 +8,8 @@ Author: Tatvic
8
  Requires at least: 3.5.0
9
  Tested up to: 5.9
10
  Requires PHP: 5.6 or Higher
11
- Stable tag: 4.6.3
12
- Version: 4.6.3
13
  License: GPLv3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
 
@@ -379,6 +379,11 @@ You can resolve the duplication of data by removing the manually implemented GA
379
 
380
 
381
  == Changelog ==
 
 
 
 
 
382
 
383
  = 4.6.3 - 03/02/2022 =
384
 
8
  Requires at least: 3.5.0
9
  Tested up to: 5.9
10
  Requires PHP: 5.6 or Higher
11
+ Stable tag: 4.6.4
12
+ Version: 4.6.4
13
  License: GPLv3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
 
379
 
380
 
381
  == Changelog ==
382
+ = 4.6.4 - 12/02/2022 =
383
+
384
+ * New: With our New Feedback feature on Dashboard ,user can now share the feedback about the plugin
385
+ * Tweak: We enhance the Product Sync feature wher user can choose the batch size for product sync
386
+ * Fix -We fixed the import products from GMC
387
 
388
  = 4.6.3 - 03/02/2022 =
389