Abandoned Cart Lite for WooCommerce - Version 3.7

Version Description

(10.04.2017)

Download this release

Release Info

Developer bhavik.kiri
Plugin Icon 128x128 Abandoned Cart Lite for WooCommerce
Version 3.7
Comparing to
See all releases

Code changes from version 3.6 to 3.7

Files changed (3) hide show
  1. assets/images/Thumbs.db +0 -0
  2. readme.txt +126 -50
  3. woocommerce-ac.php +44 -2
assets/images/Thumbs.db DELETED
Binary file
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
 
2
  === Abandoned Cart Lite for WooCommerce ===
3
  Contributors: ashokrane, pinal.shah, bhavik.kiri, chetnapatel, tychesoftwares
4
- Tags: abandon cart, cart recovery, recover lost sales, recover woocommerce cart, increase sales with woocommerce
5
  Author URI: https://www.tychesoftwares.com/
6
  Requires at least: 1.3
7
  Tested up to: 4.7.2
@@ -14,89 +14,152 @@ This easy-to-use plugin allows WooCommerce store owners to recover sales that ar
14
 
15
  == Description ==
16
 
17
- Abandoned Cart plugin works in the background, sending email notifications to your guests customers & logged-in customers, reminding them about their abandoned orders.
 
 
 
 
 
 
 
 
 
18
 
19
  The Abandoned Cart plugin allows you to recover orders that were just a step away from closing. It enables you to create automatic & well-timed email reminders to be sent to your customers who have added your products to their cart, but did not complete the order. As a result, with this plugin you will start recovering at least 30% or more of your lost sales. Why let this 30% revenue go unclaimed?
20
 
21
  Abandoned Cart Lite plugin enables to do the following things:
22
- <ol>
23
- <li>Recover their abandoned carts in a single click</li>
24
- <li>Identify the Abandoned Orders information, including the products that were abandoned</li>
25
- <li>The plugin now captures abandoned guest carts. A guest user's cart will be captured on the Checkout page, if it is abandoned after entering the email address.</li>
26
- <li>Track abandoned orders value v/s recovered orders value</li>
27
- <li>Admin is notified by email when an order is recovered</li>
28
- <li>Works off-the-shelf as it comes with 1 default email template</li>
29
- <li>Create unlimited email templates to be sent at intervals that you set - Intervals start from 1 hour after cart is abandoned</li>
30
- <li>Add custom variables like Customer First Name, Customer Last name, Customer full name, Cart Link & Product Cart Information in the email template</li>
31
- <li>Copy HTML from anywhere & create templates using the powerful Rich Text Editor</li>
32
- <li>Automatically stops email notifications when a customer makes a purchase or uses the cart recovery link</li>
33
- </ol>
 
 
 
 
 
 
 
34
 
35
  **Pro Version:**
36
 
37
- **[Abandoned Cart Pro for WooCommerce 4.9](http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro "Abandoned Cart Pro for WooCommerce")** enables to do the following additional things:
38
- <ol>
39
- <li>Works off-the-shelf as it comes with 3 default email templates</li>
40
- <li>Offer incentives to customers to return and complete their checkout with discounts and coupons</li>
41
- <li>Add custom variables like Customer Name, Product Information, Coupons, etc. in the email template</li>
42
- <li>Embed WooCommerce coupons & also generate unique coupons in the emails being sent to customers</li>
43
- <li>Track whether expired coupons are causing cart abandonment</li>
44
- <li>Track emails sent, emails opened, links clicked for each template/email</li>
45
- <li>Product report allows you to see which products are being abandoned & which are being recovered the most</li>
46
- <li>Start sending email templates within minutes of cart being abandoned.</li>
47
- <li>Admin can send the customer emails to specific abandoned cart(s) using 'Send Custom Email' feature.</li>
48
- <li>If the store is using WPML then admin can translate all the abandoned cart reminder email templates using WPML. Then the emails will be sent to the customers in the same language in which they have abandoned the cart.</li>
49
- <li>Admin can Print or export the Abandoned Orders to CSV format.</li>
50
- <li>Admin can send different email templates to 'Registered Users', 'Guest Users', 'For carts Abandoned with one product' or 'with more than one product' or to 'All'. </li>
51
- <li>Admin can restrict the abandoned carts based on the 'Email address', 'IP address' & 'Domain name'. </li>
52
- <li>Admin can take a glimpse of abandoned carts, recovered orders, and the states of the email template from the Dashboard tab.</li>
53
- </ol>
54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
- **Email Sending Setup:**
57
 
58
- From version 1.3, it is not mandatory to set a cron job via CPanel for the abandoned cart email notifications to be sent. We are now using WP-Cron that sends the emails automatically whenever a page is requested.
59
 
60
- Abandoned Cart Plugin relies on a function called WP-Cron, and this function only runs when there is a page requested. So, if there are no visits to your website, then the scheduled jobs are not run. Generally this method of sending the abandoned cart notification emails is reliable. However, if you are not very confident about the traffic volume of your website, then you can set a manual cron job via Cpanel or any other control panel that your host provides.
 
61
 
62
- **Some of our other free plugins:**
63
 
64
- 1. **[Order Delivery Date for WooCommerce](https://wordpress.org/plugins/order-delivery-date-for-woocommerce/ "Order Delivery Date for WooCommerce")**
65
 
66
- 2. **[Product Delivery Date for WooCommerce - Lite](https://wordpress.org/plugins/product-delivery-date-for-woocommerce-lite/ "Product Delivery Date for WooCommerce")**
67
 
 
68
 
69
  **Some of our Pro plugins:**
 
 
 
 
 
 
70
 
71
- 1. **[Booking & Appointment Plugin for WooCommerce 3.5.1](https://www.tychesoftwares.com/store/premium-plugins/woocommerce-booking-plugin/ "Booking & Appointment Plugin for WooCommerce")**
 
 
 
72
 
73
- 2. **[Order Delivery Date Pro for WooCommerce 6.4.3](https://www.tychesoftwares.com/store/premium-plugins/order-delivery-date-for-woocommerce-pro-21/ "Order Delivery Date Pro for WooCommerce")**
74
 
75
- 3. **[Product Delivery Date Pro for WooCommerce 2.0.1](https://www.tychesoftwares.com/store/premium-plugins/product-delivery-date-pro-for-woocommerce/ "Product Delivery Date Pro for WooCommerce")**
 
 
76
 
77
  == Installation ==
78
 
79
- 1. Ensure you have latest version of WooCommerce plugin installed
80
- 2. Unzip and upload contents of the plugin to your /wp-content/plugins/ directory
81
- 3. Activate the plugin through the 'Plugins' menu in WordPress
82
- 4. The plugin will start working as per the settings entered.
 
 
 
 
 
 
 
 
 
 
 
 
83
 
 
 
 
 
 
 
 
 
84
 
85
  == Frequently Asked Questions ==
86
 
 
 
 
 
 
 
87
  = Can the plugin track carts abandoned by guest users? =
88
 
89
- Currently there is no provision for tracking guest carts. This is planned in a future release.
90
 
91
- UPDATE: This feature has been released in version 2.2.
92
 
93
  = Why are abandoned cart notification emails not getting sent? =
94
 
95
- Please ensure you have followed the instructions in "Email Sending Setup" right above this FAQ. Additionally, if you have the PRO version, please verify that you have selected "Enable abandoned cart notifications" option in Settings. With this option turned off, the abandoned carts are recorded, but emails are not sent.
 
 
 
 
 
 
 
 
96
 
97
- = Where can I find the documentation on how to setup the plugin? =
 
 
 
 
98
 
99
- The documentation can be found **[here](https://www.tychesoftwares.com/woocommerce-abandon-cart-plugin-documentation/ "WooCommerce Abandoned Cart Pro")**. The Lite version is a subset of the Pro version, so the same documentation can be used to refer for the Lite version of the plugin.
100
 
101
  == Screenshots ==
102
 
@@ -114,6 +177,12 @@ The documentation can be found **[here](https://www.tychesoftwares.com/woocommer
114
 
115
  == Changelog ==
116
 
 
 
 
 
 
 
117
  = 3.6 (01.04.2017) =
118
 
119
  * This version has 1 bug fix.
@@ -335,6 +404,12 @@ For existing users, this setting will remain unchecked. For new users of the plu
335
 
336
  == Upgrade Notice ==
337
 
 
 
 
 
 
 
338
  = 3.6 (01.04.2017) =
339
 
340
  * This version has 1 bug fix.
@@ -551,4 +626,5 @@ For existing users, this setting will remain unchecked. For new users of the plu
551
  * Fixed 404 errors with images & other files
552
 
553
  = 1.0 (18.02.2013) =
554
- * Initial release.
 
1
 
2
  === Abandoned Cart Lite for WooCommerce ===
3
  Contributors: ashokrane, pinal.shah, bhavik.kiri, chetnapatel, tychesoftwares
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: 4.7.2
14
 
15
  == Description ==
16
 
17
+ With the average shopping cart abandonment rate as high as 70%, [Abandoned Cart Plugin](https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/?utm_source=wprepo&utm_medium=topprolink&utm_campaign=AbandonedCartLite) helps you recover those carts from your WooCommerce shop.
18
+
19
+ It works in the background, sending email notifications to your guests customers & logged-in customers, reminding them about their abandoned orders.
20
+
21
+ 70% abandonment rate means that out of 100 potential customers, more than 70 of them are leaving without transacting on the store. Email Remarketing has proven to recover on average between 20-25% of abandoned shopping carts.
22
+
23
+ > This plugin works as described: the **lite version doesn't cut down in functionality**. **You can have your orders recovered and save on sales**. Depending on what you are selling, this can be a few orders to **justify ordering the full package - i'm only a few away!**
24
+
25
+ >**Very recommended!**
26
+ > - [jaysnl](https://wordpress.org/support/topic/great-support-and-value-buy-it/)
27
 
28
  The Abandoned Cart plugin allows you to recover orders that were just a step away from closing. It enables you to create automatic & well-timed email reminders to be sent to your customers who have added your products to their cart, but did not complete the order. As a result, with this plugin you will start recovering at least 30% or more of your lost sales. Why let this 30% revenue go unclaimed?
29
 
30
  Abandoned Cart Lite plugin enables to do the following things:
31
+
32
+ 1. Allow your customers to recover their abandoned carts in a **single click**.
33
+ 2. Identify the **Abandoned Orders information**, including the products that were abandoned.
34
+ 3. The plugin now captures abandoned **guest carts**. A guest user's cart will be captured on the **Checkout page**, if it is abandoned after entering the **email address**.
35
+ 4. Track **abandoned orders value v/s recovered orders value**.
36
+ 5. Admin is notified by email when an order is **recovered**.
37
+ 6. Works off-the-shelf as it comes with 1 **default email template**.
38
+ 7. Create **unlimited email templates** to be sent at intervals that you set - Intervals start from 1 hour after cart is abandoned.
39
+ 8. Add custom variables like **Customer First Name, Customer Last name, Customer full name, Cart Link & Product Cart Information** in the email template.
40
+ 9. Copy HTML from anywhere & create templates using the powerful **Rich Text Editor**.
41
+ 10. **Automatically stops email notifications** when a customer makes a purchase or uses the cart recovery link.
42
+
43
+ You can check the detailed difference between Pro and Lite version **[here](https://www.tychesoftwares.com/differences-between-pro-and-lite-versions-of-abandoned-cart-for-woocommerce-plugin/?utm_source=wprepo&utm_medium=litelink&utm_campaign=AbandonedCartLite "Lite and Pro version Difference")**
44
+
45
+ > I'm using the plugin on my shop. **Installation is very easy and it works great**. I've already recovered some orders, **it doesn't cost any effort**.
46
+
47
+ > **Support is fast and extensive**.
48
+
49
+ > -[bertkat](https://wordpress.org/support/topic/easy-money/)
50
 
51
  **Pro Version:**
52
 
53
+ **[Abandoned Cart Pro for WooCommerce](http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Abandoned Cart Pro for WooCommerce")** enables to do the following additional things:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
 
55
+ 1. Works off-the-shelf as it comes with **3 default email templates**.
56
+ 2. Offer **incentives to customers** to return and complete their checkout with **discounts and coupons**.
57
+ 3. Add custom variables like **Customer Name, Product Information, Coupons**, etc. in the email template.
58
+ 4. Embed WooCommerce coupons & also **generate unique coupons** in the emails being sent to customers.
59
+ 5. Track whether **expired coupons** are causing cart abandonment.
60
+ 6. Track **emails sent, emails opened, links clicked** for each template/email.
61
+ 7. **Product report** allows you to see which products are being abandoned & which are being recovered the most.
62
+ 8. Start sending email templates **within minutes** of cart being abandoned.
63
+ 9. Admin can send the customer emails to specific abandoned cart(s) using **'Send Custom Email'** feature.
64
+ 10. If the store is using **WPML** then admin can translate all the abandoned cart reminder email templates using WPML. Then the emails will be sent to the customers in the **same language in which they have abandoned the cart**.
65
+ 11. Admin can **Print** or export the Abandoned Orders to **CSV** format.
66
+ 12. Admin can send **different email templates** to **'Registered Users', 'Guest Users', 'For carts Abandoned with one product' or 'with more than one product' or to 'All'**.
67
+ 13. Admin can **restrict** the abandoned carts based on the **'Email address'**, **'IP address'** & **'Domain name'**.
68
+ 14. Admin can take a **glimpse** of **abandoned carts**, **recovered orders**, and the **states of the email template** from the **Dashboard** tab.
69
 
70
+ You can check the detailed difference between Pro and Lite version **[here](https://www.tychesoftwares.com/differences-between-pro-and-lite-versions-of-abandoned-cart-for-woocommerce-plugin/?utm_source=wprepo&utm_medium=prolink&utm_campaign=AbandonedCartLite "Lite and Pro version Difference")**
71
 
72
+ > Using the free version and for now it does all I need will give it a few days use but can quickly see that **I'll likely be upgrading to Pro version**-for a 99 bucks it's hard to go wrong
73
 
74
+ > Wish list for free version
75
+ > 1. Easy way to format "Abandoned cart reminder" Header
76
 
77
+ > -[clowmilk](https://wordpress.org/support/topic/super-nice-plug-in/)
78
 
 
79
 
80
+ **Email Sending Setup:**
81
 
82
+ Abandoned Cart Plugin relies on a function called WP-Cron, and this function only runs when there is a page requested. So, if there are no visits to your website, then the scheduled jobs are not run. Generally this method of sending the abandoned cart notification emails is reliable. However, if you are not very confident about the traffic volume of your website, then you can set a manual cron job via cPanel or any other control panel that your host provides.
83
 
84
  **Some of our Pro plugins:**
85
+
86
+ 1. **[Abandoned Cart Pro for WooCommerce](https://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro/?utm_source=wprepo&utm_medium=otherprolink&utm_campaign=AbandonedCartLite "Abandoned Cart Pro for WooCommerce")**
87
+
88
+ 2. **[Booking & Appointment Plugin for WooCommerce](https://www.tychesoftwares.com/store/premium-plugins/woocommerce-booking-plugin/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Booking & Appointment Plugin for WooCommerce")**
89
+
90
+ 3. **[Order Delivery Date Pro for WooCommerce](https://www.tychesoftwares.com/store/premium-plugins/order-delivery-date-for-woocommerce-pro-21/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Order Delivery Date Pro for WooCommerce")**
91
 
92
+ 4. **[Product Delivery Date Pro for WooCommerce](https://www.tychesoftwares.com/store/premium-plugins/product-delivery-date-pro-for-woocommerce/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "Product Delivery Date Pro for WooCommerce")**
93
+
94
+
95
+ **Some of our other free plugins:**
96
 
97
+ 1. **[Order Delivery Date for WooCommerce](https://wordpress.org/plugins/order-delivery-date-for-woocommerce/ "Order Delivery Date for WooCommerce")**
98
 
99
+ 2. **[Product Delivery Date for WooCommerce](https://wordpress.org/plugins/product-delivery-date-for-woocommerce-lite/ "Product Delivery Date for WooCommerce")**
100
+
101
+ 3. **[Prevent Customers To Cancel WooCommerce Orders](https://wordpress.org/plugins/woo-prevent-cancel-order/ "Prevent Customers To Cancel WooCommerce Orders")**
102
 
103
  == Installation ==
104
 
105
+ Method 1:
106
+ <ol>
107
+ <li> Go to WordPress Dashboard->Plugins->Add New </li>
108
+ <li> Search Abandoned Cart Lite for WooCommerce plugin using search option </li>
109
+ <li> Find the plugin and click Install Now button </li>
110
+ <li> After installation, click on Activate Plugin link to activate the plugin. </li>
111
+ </ol>
112
+
113
+ Method 2:
114
+ <ol>
115
+ <li> Download the plugin woocommerce-abandoned-cart.zip </li>
116
+ <li> Unpack the woocommerce-abandoned-cart.zip file and extract the woocommerce-abandoned-cart folder </li>
117
+ <li> Upload the plugin folder to your /wp-content/plugins/ directory </li>
118
+ <li> Go to WordPress dashboard, click on Plugins from the menu </li>
119
+ <li> Locate the Abandoned Cart Lite for WooCommerce plugin and click on Activate link to activate the plugin. </li>
120
+ </ol>
121
 
122
+ Method 3:
123
+ <ol>
124
+ <li> Download the plugin woocommerce-abandoned-cart.zip </li>
125
+ <li> Go to WordPress Dashboard-Plugins-Add New </li>
126
+ <li> Click on Upload Plugin link from top </li>
127
+ <li> Upload the downloaded woocommerce-abandoned-cart.zip file and click on Install Now </li>
128
+ <li> After installation, click on Activate Plugin link to activate the plugin. </li>
129
+ </ol>
130
 
131
  == Frequently Asked Questions ==
132
 
133
+ = How is the email address of the customers captured? =
134
+
135
+ Our plugin captures visitor emails in real-time as they�re typing it in to the email address field on the checkout page, so you don�t need to worry about them changing their mind at the last second.
136
+
137
+ When logged-in user add the product to the cart we capture the email address from the user's profile.
138
+
139
  = Can the plugin track carts abandoned by guest users? =
140
 
141
+ Yes, it captures the carts of the guest users from the checkout page. We capture the guest user's abandoned cart only after the customer enters the "Email Address" on the checkout page.
142
 
143
+ Also, plugin does capture the cart from the cart page, these carts do not have any personal information of the customers. It will contain only the cart details. To capture, this information guest customer should reach the cart page of the website.
144
 
145
  = Why are abandoned cart notification emails not getting sent? =
146
 
147
+ Please ensure you have at least one Email template "Active". As only active email templates are sent to recover the abandoned carts.
148
+
149
+ For sending the abandoned cart notification emails automatically, we use WP-Cron. If you have Email templates activated and still notification are not sent, then you can debug the issue by following this **[post](https://www.tychesoftwares.com/using-wp_alternate_cron-to-overcome-the-problem-of-emails-not-being-sent-in-abandoned-cart-pro-plugin-for-woocommerce/?utm_source=wprepo&utm_medium=link&utm_campaign=AbandonedCartLite "WooCommerce Abandoned Cart Pro")**.
150
+
151
+ = When is the cart considered as an abandoned cart? =
152
+
153
+ When the products in the cart is not purchased within the set 'Cart abandoned cut-off time' then the cart is considered as an abandoned cart.
154
+
155
+ = How to unsubscribe the abandoned cart notification emails? =
156
 
157
+ The admin can use the merge code `{{cart.unsubscribe}}' in the email templates. It will be replaced with a url in the abandoned cart email notification sent to the customer. When clicked, the reminder email notification for the particular email will be unsubscribed.
158
+
159
+ = Difference between Lite and Pro version of the plugin =
160
+
161
+ You can refer **[here](https://www.tychesoftwares.com/differences-between-pro-and-lite-versions-of-abandoned-cart-for-woocommerce-plugin/?utm_source=wprepo&utm_medium=faqlink&utm_campaign=AbandonedCartLite "Lite and Pro version Difference")**
162
 
 
163
 
164
  == Screenshots ==
165
 
177
 
178
  == Changelog ==
179
 
180
+ = 3.7 (10.04.2017) =
181
+
182
+ * This version has 1 bug fix.
183
+
184
+ * Bug Fixed - If guest customer places an order by selecting "Create an account" checkbox or enters the password in "Account password" field on the checkout page, then an abandoned cart was created after "Cart abandoned cut off time" is reached. Also, abandoned cart reminder email were sent to the customers after the order was placed. Now onwards, orders placed by guest users by registering while placing order will not be captured.
185
+
186
  = 3.6 (01.04.2017) =
187
 
188
  * This version has 1 bug fix.
404
 
405
  == Upgrade Notice ==
406
 
407
+ = 3.7 (10.04.2017) =
408
+
409
+ * This version has 1 bug fix.
410
+
411
+ * Bug Fixed - If guest customer places an order by selecting "Create an account" checkbox or enters the password in "Account password" field on the checkout page, then an abandoned cart was created after "Cart abandoned cut off time" is reached. Also, abandoned cart reminder email were sent to the customers after the order was placed. Now onwards, orders placed by guest users by registering while placing order will not be captured.
412
+
413
  = 3.6 (01.04.2017) =
414
 
415
  * This version has 1 bug fix.
626
  * Fixed 404 errors with images & other files
627
 
628
  = 1.0 (18.02.2013) =
629
+ * Initial release.
630
+
woocommerce-ac.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Abandoned Cart Lite for WooCommerce
4
  Plugin URI: http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro
5
  Description: This plugin captures abandoned carts by logged-in users & emails them about it. <strong><a href="http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro">Click here to get the PRO Version.</a></strong>
6
- Version: 3.6
7
  Author: Tyche Softwares
8
  Author URI: http://www.tychesoftwares.com/
9
  Text Domain: woocommerce-ac
@@ -235,7 +235,49 @@ if( !class_exists( 'woocommerce_abandon_cart_lite' ) ) {
235
 
236
  update_post_meta( $order_id , 'wcal_recover_order_placed', $abandoned_order_id );
237
  update_post_meta( $order_id , 'wcal_recover_order_placed_sent_id', $email_sent_id );
238
- } else if ( isset( $_SESSION['abandoned_cart_id_lite'] ) && $_SESSION['abandoned_cart_id_lite'] !='' ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  global $woocommerce, $wpdb;
240
  $results_sent = array();
241
  $abandoned_cart_id = $_SESSION['abandoned_cart_id_lite'];
3
  Plugin Name: Abandoned Cart Lite for WooCommerce
4
  Plugin URI: http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro
5
  Description: This plugin captures abandoned carts by logged-in users & emails them about it. <strong><a href="http://www.tychesoftwares.com/store/premium-plugins/woocommerce-abandoned-cart-pro">Click here to get the PRO Version.</a></strong>
6
+ Version: 3.7
7
  Author: Tyche Softwares
8
  Author URI: http://www.tychesoftwares.com/
9
  Text Domain: woocommerce-ac
235
 
236
  update_post_meta( $order_id , 'wcal_recover_order_placed', $abandoned_order_id );
237
  update_post_meta( $order_id , 'wcal_recover_order_placed_sent_id', $email_sent_id );
238
+ } else if ( isset( $_SESSION['abandoned_cart_id_lite'] ) && $_SESSION['abandoned_cart_id_lite'] != '' &&
239
+ isset( $_POST['account_password'] ) && $_POST['account_password'] != '' ) {
240
+
241
+ global $woocommerce, $wpdb;
242
+ $results_sent = array();
243
+ $abandoned_cart_id_new_user = $_SESSION['abandoned_cart_id_lite'];
244
+ $wcap_user_id_of_guest = $_SESSION['user_id'];
245
+ /* delete the guest record. As it become the logged in user */
246
+ $table_name = $wpdb->prefix . 'ac_abandoned_cart_history_lite';
247
+ $wpdb->delete( $table_name , array( 'user_id' => $wcap_user_id_of_guest ) );
248
+
249
+ $table_name = $wpdb->prefix . 'ac_guest_abandoned_cart_history_lite';
250
+ $wpdb->delete( $table_name , array( 'id' => $wcap_user_id_of_guest ) );
251
+
252
+ /* Check if for the logged in user we have sent any abandoned cart reminder email */
253
+ $get_email_sent_for_abandoned_id = "SELECT * FROM `" . $wpdb->prefix . "ac_sent_history_lite` WHERE abandoned_order_id = %d ";
254
+ $results_sent = $wpdb->get_results( $wpdb->prepare( $get_email_sent_for_abandoned_id, $abandoned_cart_id_new_user ) );
255
+
256
+ if ( empty( $results_sent ) && count( $results_sent ) == 0 ) {
257
+
258
+ /*
259
+ * If logged in user place the order once it is displyed under the abandoned orders tab.
260
+ * But the email has been not sent to the user. And order is placed successfuly
261
+ * Then We are deleteing those order. But for those orders Recovered email has been set to the Admin.
262
+ * Below code ensure that admin recovery email wil not be sent for tose orders.
263
+ */
264
+ $get_user_id_of_abandoned_cart = "SELECT * FROM `" . $wpdb->prefix . "ac_abandoned_cart_history` WHERE id = %d ";
265
+ $get_results_of_user_id = $wpdb->get_results ( $wpdb->prepare( $get_user_id_of_abandoned_cart, $abandoned_cart_id_new_user ) );
266
+ $user_id = $get_results_of_user_id[0]->user_id;
267
+
268
+ delete_user_meta( $user_id, '_woocommerce_ac_modified_cart' );
269
+ /*
270
+ * It will delete the order from history table if the order is placed before any email sent to the user.
271
+ *
272
+ */
273
+ $table_name = $wpdb->prefix . 'ac_abandoned_cart_history_lite';
274
+ $wpdb->delete( $table_name , array( 'id' => $abandoned_cart_id_new_user ) );
275
+ } else {
276
+ $email_sent_id = $results_sent[0]->id;
277
+ update_post_meta( $order_id , 'wcal_recover_order_placed', $abandoned_cart_id_new_user );
278
+ update_post_meta( $order_id , 'wcal_recover_order_placed_sent_id', $email_sent_id );
279
+ }
280
+ } else if ( isset( $_SESSION['abandoned_cart_id_lite'] ) && $_SESSION['abandoned_cart_id_lite'] !='' ) {
281
  global $woocommerce, $wpdb;
282
  $results_sent = array();
283
  $abandoned_cart_id = $_SESSION['abandoned_cart_id_lite'];