Abandoned Cart Lite for WooCommerce - Version 5.5.1

Version Description

(21.08.2019) =

  • Tweak - Modified the WooCommerce tested upto tag to 3.7.
  • Bug - Fixed an issue where guest email was not getting captured when GDPR message was not set.
  • Bug - Fixed an issue where the cart price was recorded as 0 with WooCommerce 3.7.0.
Download this release

Release Info

Developer Dhruvin
Plugin Icon 128x128 Abandoned Cart Lite for WooCommerce
Version 5.5.1
Comparing to
See all releases

Code changes from version 5.5 to 5.5.1

assets/js/wcal_guest_capture.js CHANGED
@@ -1,7 +1,9 @@
1
  var gdpr_consent = true;
2
  jQuery( 'input#billing_email' ).on( 'change', function() {
3
 
4
- if( gdpr_consent && wcal_guest_capture_params._show_gdpr_message ) {
 
 
5
  var data = {
6
  billing_first_name : jQuery('#billing_first_name').val(),
7
  billing_last_name : jQuery('#billing_last_name').val(),
@@ -26,7 +28,7 @@ jQuery( 'input#billing_email' ).on( 'change', function() {
26
  shipping_country : jQuery('#shipping_country').val(),
27
  ship_to_billing : jQuery('#shiptobilling-checkbox').val(),
28
  action: 'save_data'
29
- };
30
  jQuery.post( wcal_guest_capture_params.ajax_url, data, function(response) {
31
  });
32
  }
@@ -45,7 +47,7 @@ jQuery( document ).ready( function() {
45
 
46
  // run an ajax call and save the data that user did not give consent
47
  var data = {
48
- action : 'wcal_gdpr_refused'
49
  };
50
  jQuery.post( wcal_guest_capture_params.ajax_url, data, function() {
51
  jQuery("#wcal_gdpr_message_block").empty().append("<span style='font-size: small'>" +
1
  var gdpr_consent = true;
2
  jQuery( 'input#billing_email' ).on( 'change', function() {
3
 
4
+ var message_data = wcal_guest_capture_params._show_gdpr_message ? wcal_guest_capture_params._show_gdpr_message : true;
5
+
6
+ if( gdpr_consent && message_data ) {
7
  var data = {
8
  billing_first_name : jQuery('#billing_first_name').val(),
9
  billing_last_name : jQuery('#billing_last_name').val(),
28
  shipping_country : jQuery('#shipping_country').val(),
29
  ship_to_billing : jQuery('#shiptobilling-checkbox').val(),
30
  action: 'save_data'
31
+ };
32
  jQuery.post( wcal_guest_capture_params.ajax_url, data, function(response) {
33
  });
34
  }
47
 
48
  // run an ajax call and save the data that user did not give consent
49
  var data = {
50
+ action : 'wcal_gdpr_refused'
51
  };
52
  jQuery.post( wcal_guest_capture_params.ajax_url, data, function() {
53
  jQuery("#wcal_gdpr_message_block").empty().append("<span style='font-size: small'>" +
assets/js/wcal_guest_capture.min.js CHANGED
@@ -1 +1 @@
1
- var gdpr_consent=!0;jQuery("input#billing_email").on("change",function(){if(gdpr_consent&&wcal_guest_capture_params._show_gdpr_message){var a={billing_first_name:jQuery("#billing_first_name").val(),billing_last_name:jQuery("#billing_last_name").val(),billing_company:jQuery("#billing_company").val(),billing_address_1:jQuery("#billing_address_1").val(),billing_address_2:jQuery("#billing_address_2").val(),billing_city:jQuery("#billing_city").val(),billing_state:jQuery("#billing_state").val(),billing_postcode:jQuery("#billing_postcode").val(),billing_country:jQuery("#billing_country").val(),billing_phone:jQuery("#billing_phone").val(),billing_email:jQuery("#billing_email").val(),order_notes:jQuery("#order_comments").val(),shipping_first_name:jQuery("#shipping_first_name").val(),shipping_last_name:jQuery("#shipping_last_name").val(),shipping_company:jQuery("#shipping_company").val(),shipping_address_1:jQuery("#shipping_address_1").val(),shipping_address_2:jQuery("#shipping_address_2").val(),shipping_city:jQuery("#shipping_city").val(),shipping_state:jQuery("#shipping_state").val(),shipping_postcode:jQuery("#shipping_postcode").val(),shipping_country:jQuery("#shipping_country").val(),ship_to_billing:jQuery("#shiptobilling-checkbox").val(),action:"save_data"};jQuery.post(wcal_guest_capture_params.ajax_url,a,function(a){})}}),jQuery(document).ready(function(){wcal_guest_capture_params._show_gdpr_message&&!jQuery("#wcal_gdpr_message_block").length&&gdpr_consent&&jQuery("#billing_email").after("<span id='wcal_gdpr_message_block'> <span style='font-size: small'> "+wcal_guest_capture_params._gdpr_message+" <a style='cursor: pointer' id='wcal_gdpr_no_thanks'> "+wcal_guest_capture_params._gdpr_nothanks_msg+" </a></span></span>"),jQuery("#wcal_gdpr_no_thanks").click(function(){wcal_guest_capture_params._show_gdpr_message=!1,gdpr_consent=!1;jQuery.post(wcal_guest_capture_params.ajax_url,{action:"wcal_gdpr_refused"},function(){jQuery("#wcal_gdpr_message_block").empty().append("<span style='font-size: small'>"+wcal_guest_capture_params._gdpr_after_no_thanks_msg+"</span>").delay(5e3).fadeOut()})})});
1
+ var gdpr_consent=!0;jQuery("input#billing_email").on("change",function(){var a=!wcal_guest_capture_params._show_gdpr_message||wcal_guest_capture_params._show_gdpr_message;if(gdpr_consent&&a){var _={billing_first_name:jQuery("#billing_first_name").val(),billing_last_name:jQuery("#billing_last_name").val(),billing_company:jQuery("#billing_company").val(),billing_address_1:jQuery("#billing_address_1").val(),billing_address_2:jQuery("#billing_address_2").val(),billing_city:jQuery("#billing_city").val(),billing_state:jQuery("#billing_state").val(),billing_postcode:jQuery("#billing_postcode").val(),billing_country:jQuery("#billing_country").val(),billing_phone:jQuery("#billing_phone").val(),billing_email:jQuery("#billing_email").val(),order_notes:jQuery("#order_comments").val(),shipping_first_name:jQuery("#shipping_first_name").val(),shipping_last_name:jQuery("#shipping_last_name").val(),shipping_company:jQuery("#shipping_company").val(),shipping_address_1:jQuery("#shipping_address_1").val(),shipping_address_2:jQuery("#shipping_address_2").val(),shipping_city:jQuery("#shipping_city").val(),shipping_state:jQuery("#shipping_state").val(),shipping_postcode:jQuery("#shipping_postcode").val(),shipping_country:jQuery("#shipping_country").val(),ship_to_billing:jQuery("#shiptobilling-checkbox").val(),action:"save_data"};jQuery.post(wcal_guest_capture_params.ajax_url,_,function(a){})}}),jQuery(document).ready(function(){wcal_guest_capture_params._show_gdpr_message&&!jQuery("#wcal_gdpr_message_block").length&&gdpr_consent&&jQuery("#billing_email").after("<span id='wcal_gdpr_message_block'> <span style='font-size: small'> "+wcal_guest_capture_params._gdpr_message+" <a style='cursor: pointer' id='wcal_gdpr_no_thanks'> "+wcal_guest_capture_params._gdpr_nothanks_msg+" </a></span></span>"),jQuery("#wcal_gdpr_no_thanks").click(function(){wcal_guest_capture_params._show_gdpr_message=!1,gdpr_consent=!1;jQuery.post(wcal_guest_capture_params.ajax_url,{action:"wcal_gdpr_refused"},function(){jQuery("#wcal_gdpr_message_block").empty().append("<span style='font-size: small'>"+wcal_guest_capture_params._gdpr_after_no_thanks_msg+"</span>").delay(5e3).fadeOut()})})});
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  
2
  === Abandoned Cart Lite for WooCommerce ===
3
  Contributors: ashokrane, pinal.shah, bhavik.kiri, chetnapatel, tychesoftwares, dhruvin
4
- Tags: abandon cart, cart recovery, increase woocommerce conversion rate , recover woocommerce cart, increase sales with woocommerce
5
  Author URI: https://www.tychesoftwares.com/
6
  Requires at least: 1.3
7
  Tested up to: 5.2.2
@@ -193,6 +193,12 @@ You can refer **[here](https://www.tychesoftwares.com/differences-between-pro-an
193
 
194
  == Changelog ==
195
 
 
 
 
 
 
 
196
  = 5.5 (12.08.2019) =
197
 
198
  * Enhancement - Added a setting to allow the admin the ability to enable/disable the sending of reminder emails.
1
  
2
  === Abandoned Cart Lite for WooCommerce ===
3
  Contributors: ashokrane, pinal.shah, bhavik.kiri, chetnapatel, tychesoftwares, dhruvin
4
+ Tags: abandon cart, cart recovery, increase woocommerce conversion rate, recover woocommerce cart, increase sales with woocommerce
5
  Author URI: https://www.tychesoftwares.com/
6
  Requires at least: 1.3
7
  Tested up to: 5.2.2
193
 
194
  == Changelog ==
195
 
196
+ = 5.5.1 (21.08.2019) =
197
+
198
+ * Tweak - Modified the WooCommerce tested upto tag to 3.7.
199
+ * Bug - Fixed an issue where guest email was not getting captured when GDPR message was not set.
200
+ * Bug - Fixed an issue where the cart price was recorded as 0 with WooCommerce 3.7.0.
201
+
202
  = 5.5 (12.08.2019) =
203
 
204
  * Enhancement - Added a setting to allow the admin the ability to enable/disable the sending of reminder emails.
woocommerce-ac.php CHANGED
@@ -5,14 +5,14 @@
5
  * Description: This plugin captures abandoned carts by logged-in users & emails them about it.
6
  * <strong><a href="http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro">Click here to get the
7
  * PRO Version.</a></strong>
8
- * Version: 5.5
9
  * Author: Tyche Softwares
10
  * Author URI: http://www.tychesoftwares.com/
11
  * Text Domain: woocommerce-abandoned-cart
12
  * Domain Path: /i18n/languages/
13
  * Requires PHP: 5.6
14
  * WC requires at least: 3.0.0
15
- * WC tested up to: 3.6.5
16
  *
17
  * @package Abandoned-Cart-Lite-for-WooCommerce
18
  */
@@ -971,7 +971,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
971
  $wcal_previous_version = get_option( 'wcal_previous_version' );
972
 
973
  if ( $wcal_previous_version != wcal_common::wcal_get_version() ) {
974
- update_option( 'wcal_previous_version', '5.5' );
975
  }
976
 
977
  /**
@@ -1240,9 +1240,13 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
1240
  $results = $wpdb->get_results( $wpdb->prepare( $query, $user_id, $cart_ignored, $recovered_cart ) );
1241
 
1242
  if ( 0 == count( $results ) ) {
1243
- $wcal_woocommerce_persistent_cart =version_compare( $woocommerce->version, '3.1.0', ">=" ) ? '_woocommerce_persistent_cart_' . get_current_blog_id() : '_woocommerce_persistent_cart' ;
1244
 
1245
- $cart_info_meta = json_encode( get_user_meta( $user_id, $wcal_woocommerce_persistent_cart, true ) );
 
 
 
 
1246
 
1247
  if( '' !== $cart_info_meta && '{"cart":[]}' != $cart_info_meta && '""' !== $cart_info_meta ) {
1248
  $cart_info = $cart_info_meta;
@@ -1256,8 +1260,12 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
1256
  wcal_common::wcal_set_cart_session( 'abandoned_cart_id_lite', $abandoned_cart_id );
1257
  }
1258
  } elseif ( isset( $results[0]->abandoned_cart_time ) && $compare_time > $results[0]->abandoned_cart_time ) {
1259
- $wcal_woocommerce_persistent_cart = version_compare( $woocommerce->version, '3.1.0', ">=" ) ? '_woocommerce_persistent_cart_' . get_current_blog_id() : '_woocommerce_persistent_cart' ;
1260
- $updated_cart_info = json_encode( get_user_meta( $user_id, $wcal_woocommerce_persistent_cart, true ) );
 
 
 
 
1261
 
1262
  if ( ! $this->wcal_compare_carts( $user_id, $results[0]->abandoned_cart_info ) ) {
1263
  $updated_cart_ignored = 1;
@@ -1280,8 +1288,12 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
1280
  update_user_meta ( $user_id, '_woocommerce_ac_modified_cart', md5( "no" ) );
1281
  }
1282
  } else {
1283
- $wcal_woocommerce_persistent_cart = version_compare( $woocommerce->version, '3.1.0', ">=" ) ? '_woocommerce_persistent_cart_' . get_current_blog_id() : '_woocommerce_persistent_cart' ;
1284
- $updated_cart_info = json_encode( get_user_meta( $user_id, $wcal_woocommerce_persistent_cart, true ) );
 
 
 
 
1285
 
1286
  $query_update = "UPDATE `".$wpdb->prefix."ac_abandoned_cart_history_lite`
1287
  SET abandoned_cart_info = %s,
5
  * Description: This plugin captures abandoned carts by logged-in users & emails them about it.
6
  * <strong><a href="http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro">Click here to get the
7
  * PRO Version.</a></strong>
8
+ * Version: 5.5.1
9
  * Author: Tyche Softwares
10
  * Author URI: http://www.tychesoftwares.com/
11
  * Text Domain: woocommerce-abandoned-cart
12
  * Domain Path: /i18n/languages/
13
  * Requires PHP: 5.6
14
  * WC requires at least: 3.0.0
15
+ * WC tested up to: 3.7.0
16
  *
17
  * @package Abandoned-Cart-Lite-for-WooCommerce
18
  */
971
  $wcal_previous_version = get_option( 'wcal_previous_version' );
972
 
973
  if ( $wcal_previous_version != wcal_common::wcal_get_version() ) {
974
+ update_option( 'wcal_previous_version', '5.5.1' );
975
  }
976
 
977
  /**
1240
  $results = $wpdb->get_results( $wpdb->prepare( $query, $user_id, $cart_ignored, $recovered_cart ) );
1241
 
1242
  if ( 0 == count( $results ) ) {
1243
+ //$wcal_woocommerce_persistent_cart =version_compare( $woocommerce->version, '3.1.0', ">=" ) ? '_woocommerce_persistent_cart_' . get_current_blog_id() : '_woocommerce_persistent_cart' ;
1244
 
1245
+ //$cart_info_meta = json_encode( get_user_meta( $user_id, $wcal_woocommerce_persistent_cart, true ) );
1246
+
1247
+ $cart_info_meta = array();
1248
+ $cart_info_meta['cart'] = WC()->session->cart;
1249
+ $cart_info_meta = json_encode( $cart_info_meta );
1250
 
1251
  if( '' !== $cart_info_meta && '{"cart":[]}' != $cart_info_meta && '""' !== $cart_info_meta ) {
1252
  $cart_info = $cart_info_meta;
1260
  wcal_common::wcal_set_cart_session( 'abandoned_cart_id_lite', $abandoned_cart_id );
1261
  }
1262
  } elseif ( isset( $results[0]->abandoned_cart_time ) && $compare_time > $results[0]->abandoned_cart_time ) {
1263
+ //$wcal_woocommerce_persistent_cart = version_compare( $woocommerce->version, '3.1.0', ">=" ) ? '_woocommerce_persistent_cart_' . get_current_blog_id() : '_woocommerce_persistent_cart' ;
1264
+ //$updated_cart_info = json_encode( get_user_meta( $user_id, $wcal_woocommerce_persistent_cart, true ) );
1265
+
1266
+ $updated_cart_info = array();
1267
+ $updated_cart_info['cart'] = WC()->session->cart;
1268
+ $updated_cart_info = json_encode( $updated_cart_info );
1269
 
1270
  if ( ! $this->wcal_compare_carts( $user_id, $results[0]->abandoned_cart_info ) ) {
1271
  $updated_cart_ignored = 1;
1288
  update_user_meta ( $user_id, '_woocommerce_ac_modified_cart', md5( "no" ) );
1289
  }
1290
  } else {
1291
+ //$wcal_woocommerce_persistent_cart = version_compare( $woocommerce->version, '3.1.0', ">=" ) ? '_woocommerce_persistent_cart_' . get_current_blog_id() : '_woocommerce_persistent_cart' ;
1292
+ //$updated_cart_info = json_encode( get_user_meta( $user_id, $wcal_woocommerce_persistent_cart, true ) );
1293
+
1294
+ $updated_cart_info = array();
1295
+ $updated_cart_info['cart'] = WC()->session->cart;
1296
+ $updated_cart_info = json_encode( $updated_cart_info );
1297
 
1298
  $query_update = "UPDATE `".$wpdb->prefix."ac_abandoned_cart_history_lite`
1299
  SET abandoned_cart_info = %s,