Version Description
( 25.08.2021) = * Enhancement - Added the ability to setup reminder email frequency in minutes. * Tweak - Added a filter to allow reminder emails to be sent for carts with the total as 0. * Fix - The plugin tried to send a test email when the field was left blanks. * Fix - Recovered order note was added for cancelled orders in WP Dashboard.
Download this release
Release Info
| Developer | tychesoftwares |
| Plugin | |
| Version | 5.10.0 |
| Comparing to | |
| See all releases | |
Code changes from version 5.9.0 to 5.10.0
- class-wcal-update.php +8 -0
- cron/class-wcal-cron.php +16 -8
- i18n/languages/woocommerce-abandoned-cart.pot +49 -45
- includes/class-wcal-common.php +7 -0
- includes/classes/class-wcal-templates-table.php +1 -1
- includes/frontend/class-wcal-checkout-process.php +7 -0
- readme.txt +6 -0
- woocommerce-ac.php +17 -6
class-wcal-update.php
CHANGED
|
@@ -250,6 +250,14 @@ if ( ! class_exists( 'Wcal_Update' ) ) {
|
|
| 250 |
self::wcal_update_email_status( $db_prefix );
|
| 251 |
}
|
| 252 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 253 |
}
|
| 254 |
|
| 255 |
/**
|
| 250 |
self::wcal_update_email_status( $db_prefix );
|
| 251 |
}
|
| 252 |
|
| 253 |
+
// 5.10.0 adding Minutes to the Mail frequency
|
| 254 |
+
|
| 255 |
+
$results = $wpdb->get_results( 'SHOW COLUMNS FROM ' . $db_prefix . "ac_email_templates_lite LIKE 'day_or_hour'" ); //phpcs:ignore
|
| 256 |
+
|
| 257 |
+
if ( isset( $results, $results[0]->Type ) && ( $results[0]->Type !== "ENUM('Days','Hours','Minutes')" ) ) { //phpcs:ignore
|
| 258 |
+
$wpdb->query( 'ALTER TABLE ' . $db_prefix . "ac_email_templates_lite CHANGE `day_or_hour` `day_or_hour` ENUM('Days','Hours','Minutes') CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL" ); //phpcs:ignore
|
| 259 |
+
}
|
| 260 |
+
|
| 261 |
}
|
| 262 |
|
| 263 |
/**
|
cron/class-wcal-cron.php
CHANGED
|
@@ -59,12 +59,18 @@ if ( ! class_exists( 'Wcal_Cron' ) ) {
|
|
| 59 |
}
|
| 60 |
|
| 61 |
foreach ( $results as $key => $value ) {
|
| 62 |
-
if ( '
|
|
|
|
|
|
|
| 63 |
$time_to_send_template_after = intval( $value->frequency ) * $day_seconds;
|
| 64 |
} elseif ( 'Hours' === $value->day_or_hour ) {
|
| 65 |
$time_to_send_template_after = intval( $value->frequency ) * $hour_seconds;
|
| 66 |
}
|
| 67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
$carts = $this->wcal_get_carts( $time_to_send_template_after, $cart_abandon_cut_off_time, $value->id );
|
| 69 |
|
| 70 |
$email_frequency = $value->frequency;
|
|
@@ -189,7 +195,7 @@ if ( ! class_exists( 'Wcal_Cron' ) ) {
|
|
| 189 |
$cart_info_db = $value->abandoned_cart_info;
|
| 190 |
$email_subject = $template_email_subject;
|
| 191 |
$email_body = $email_body_template;
|
| 192 |
-
$wcal_check_cart_total = $this->wcal_check_cart_total( $cart );
|
| 193 |
if ( true === $wcal_check_cart_total ) {
|
| 194 |
if ( 'GUEST' === $value->user_type ) {
|
| 195 |
if ( isset( $results_guest[0]->billing_first_name ) ) {
|
|
@@ -350,9 +356,9 @@ if ( ! class_exists( 'Wcal_Cron' ) ) {
|
|
| 350 |
$item_total_display = wc_price( $item_total );
|
| 351 |
$item_subtotal = wc_price( $item_subtotal );
|
| 352 |
|
| 353 |
-
$image_id
|
| 354 |
-
$image_url
|
| 355 |
-
if (
|
| 356 |
$image_url = wp_get_attachment_url( get_post_thumbnail_id( $v->product_id ) );
|
| 357 |
}
|
| 358 |
if ( strpos( $image_url, '/' ) === 0 ) {
|
|
@@ -497,16 +503,18 @@ if ( ! class_exists( 'Wcal_Cron' ) ) {
|
|
| 497 |
* It will check the cart total.
|
| 498 |
*
|
| 499 |
* @param array|object $cart Cart details.
|
|
|
|
| 500 |
* @return boolean true | false
|
| 501 |
* @since 4.3
|
| 502 |
*/
|
| 503 |
-
public function wcal_check_cart_total( $cart ) {
|
|
|
|
| 504 |
foreach ( $cart as $k => $v ) {
|
| 505 |
if ( $v->line_total > 0 ) {
|
| 506 |
-
|
| 507 |
}
|
| 508 |
}
|
| 509 |
-
return
|
| 510 |
}
|
| 511 |
|
| 512 |
/**
|
| 59 |
}
|
| 60 |
|
| 61 |
foreach ( $results as $key => $value ) {
|
| 62 |
+
if ( 'Minutes' === $value->day_or_hour ) {
|
| 63 |
+
$time_to_send_template_after = intval( $value->frequency ) * 60;
|
| 64 |
+
} elseif ( 'Days' === $value->day_or_hour ) {
|
| 65 |
$time_to_send_template_after = intval( $value->frequency ) * $day_seconds;
|
| 66 |
} elseif ( 'Hours' === $value->day_or_hour ) {
|
| 67 |
$time_to_send_template_after = intval( $value->frequency ) * $hour_seconds;
|
| 68 |
}
|
| 69 |
|
| 70 |
+
if ( ! isset( $time_to_send_template_after ) ) {
|
| 71 |
+
continue;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
$carts = $this->wcal_get_carts( $time_to_send_template_after, $cart_abandon_cut_off_time, $value->id );
|
| 75 |
|
| 76 |
$email_frequency = $value->frequency;
|
| 195 |
$cart_info_db = $value->abandoned_cart_info;
|
| 196 |
$email_subject = $template_email_subject;
|
| 197 |
$email_body = $email_body_template;
|
| 198 |
+
$wcal_check_cart_total = $this->wcal_check_cart_total( $cart, $value->id );
|
| 199 |
if ( true === $wcal_check_cart_total ) {
|
| 200 |
if ( 'GUEST' === $value->user_type ) {
|
| 201 |
if ( isset( $results_guest[0]->billing_first_name ) ) {
|
| 356 |
$item_total_display = wc_price( $item_total );
|
| 357 |
$item_subtotal = wc_price( $item_subtotal );
|
| 358 |
|
| 359 |
+
$image_id = isset( $v->variation_id ) && $v->variation_id > 0 ? $v->variation_id : $v->product_id;
|
| 360 |
+
$image_url = wp_get_attachment_url( get_post_thumbnail_id( $image_id ) );
|
| 361 |
+
if ( ! $image_url && isset( $v->variation_id ) && (int) $image_id === (int) $v->variation_id ) {
|
| 362 |
$image_url = wp_get_attachment_url( get_post_thumbnail_id( $v->product_id ) );
|
| 363 |
}
|
| 364 |
if ( strpos( $image_url, '/' ) === 0 ) {
|
| 503 |
* It will check the cart total.
|
| 504 |
*
|
| 505 |
* @param array|object $cart Cart details.
|
| 506 |
+
* @param int $cart_id - Abandoned Cart ID.
|
| 507 |
* @return boolean true | false
|
| 508 |
* @since 4.3
|
| 509 |
*/
|
| 510 |
+
public function wcal_check_cart_total( $cart, $cart_id ) {
|
| 511 |
+
$cart_total_check = false;
|
| 512 |
foreach ( $cart as $k => $v ) {
|
| 513 |
if ( $v->line_total > 0 ) {
|
| 514 |
+
$cart_total_check = true;
|
| 515 |
}
|
| 516 |
}
|
| 517 |
+
return apply_filters( 'wcal_check_cart_total', $cart_total_check, $cart_id );
|
| 518 |
}
|
| 519 |
|
| 520 |
/**
|
i18n/languages/woocommerce-abandoned-cart.pot
CHANGED
|
@@ -2,16 +2,16 @@
|
|
| 2 |
# This file is distributed under the same license as the Abandoned Cart Lite for WooCommerce plugin.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
-
"Project-Id-Version: Abandoned Cart Lite for WooCommerce 5.
|
| 6 |
-
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/
|
| 7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
| 8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
| 12 |
-
"POT-Creation-Date: 2021-
|
| 13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
| 14 |
-
"X-Generator: WP-CLI 2.
|
| 15 |
"X-Domain: woocommerce-abandoned-cart\n"
|
| 16 |
|
| 17 |
#. Plugin Name of the plugin
|
|
@@ -34,72 +34,72 @@ msgstr ""
|
|
| 34 |
msgid "http://www.tychesoftwares.com/"
|
| 35 |
msgstr ""
|
| 36 |
|
| 37 |
-
#: cron/class-wcal-cron.php:
|
| 38 |
msgid "Abandoned cart reminder"
|
| 39 |
msgstr ""
|
| 40 |
|
| 41 |
-
#: cron/class-wcal-cron.php:
|
| 42 |
#: woocommerce-ac.php:2964
|
| 43 |
-
#: woocommerce-ac.php:
|
| 44 |
-
#: woocommerce-ac.php:
|
| 45 |
msgid "Quantity"
|
| 46 |
msgstr ""
|
| 47 |
|
| 48 |
-
#: cron/class-wcal-cron.php:
|
| 49 |
-
#: woocommerce-ac.php:
|
| 50 |
-
#: woocommerce-ac.php:
|
| 51 |
msgid "Price"
|
| 52 |
msgstr ""
|
| 53 |
|
| 54 |
-
#: cron/class-wcal-cron.php:
|
| 55 |
#: woocommerce-ac.php:2965
|
| 56 |
-
#: woocommerce-ac.php:
|
| 57 |
-
#: woocommerce-ac.php:
|
| 58 |
msgid "Line Subtotal"
|
| 59 |
msgstr ""
|
| 60 |
|
| 61 |
-
#: cron/class-wcal-cron.php:
|
| 62 |
-
#: cron/class-wcal-cron.php:
|
| 63 |
-
#: woocommerce-ac.php:
|
| 64 |
-
#: woocommerce-ac.php:
|
| 65 |
msgid "Your Shopping Cart"
|
| 66 |
msgstr ""
|
| 67 |
|
| 68 |
-
#: cron/class-wcal-cron.php:
|
| 69 |
-
#: cron/class-wcal-cron.php:
|
| 70 |
#: woocommerce-ac.php:2962
|
| 71 |
-
#: woocommerce-ac.php:
|
| 72 |
-
#: woocommerce-ac.php:
|
| 73 |
msgid "Item"
|
| 74 |
msgstr ""
|
| 75 |
|
| 76 |
-
#: cron/class-wcal-cron.php:
|
| 77 |
-
#: cron/class-wcal-cron.php:
|
| 78 |
#: woocommerce-ac.php:2963
|
| 79 |
-
#: woocommerce-ac.php:
|
| 80 |
-
#: woocommerce-ac.php:
|
| 81 |
msgid "Name"
|
| 82 |
msgstr ""
|
| 83 |
|
| 84 |
-
#: cron/class-wcal-cron.php:
|
| 85 |
-
#: cron/class-wcal-cron.php:
|
| 86 |
msgid "SKU: "
|
| 87 |
msgstr ""
|
| 88 |
|
| 89 |
-
#: cron/class-wcal-cron.php:
|
| 90 |
-
#: woocommerce-ac.php:
|
| 91 |
-
#: woocommerce-ac.php:
|
| 92 |
msgid "Cart Total:"
|
| 93 |
msgstr ""
|
| 94 |
|
| 95 |
-
#: cron/class-wcal-cron.php:
|
| 96 |
msgid "Product no longer exists"
|
| 97 |
msgstr ""
|
| 98 |
|
| 99 |
-
#: cron/class-wcal-cron.php:
|
| 100 |
-
#: cron/class-wcal-cron.php:
|
| 101 |
#: includes/frontend/class-wcal-checkout-process.php:220
|
| 102 |
-
#: includes/frontend/class-wcal-checkout-process.php:
|
| 103 |
msgid "This order was abandoned & subsequently recovered."
|
| 104 |
msgstr ""
|
| 105 |
|
|
@@ -199,7 +199,7 @@ msgstr ""
|
|
| 199 |
#: includes/admin/class-wcap-add-cart-popup-modal.php:84
|
| 200 |
#: includes/admin/class-wcap-pro-settings.php:66
|
| 201 |
#: includes/admin/class-wcap-pro-settings.php:384
|
| 202 |
-
#: woocommerce-ac.php:
|
| 203 |
msgid "Save Changes"
|
| 204 |
msgstr ""
|
| 205 |
|
|
@@ -1319,32 +1319,36 @@ msgstr ""
|
|
| 1319 |
msgid "Send this email:"
|
| 1320 |
msgstr ""
|
| 1321 |
|
| 1322 |
-
#: woocommerce-ac.php:
|
| 1323 |
msgid "after cart is abandoned."
|
| 1324 |
msgstr ""
|
| 1325 |
|
| 1326 |
-
#: woocommerce-ac.php:
|
| 1327 |
msgid "Send a test email to:"
|
| 1328 |
msgstr ""
|
| 1329 |
|
| 1330 |
-
#: woocommerce-ac.php:
|
| 1331 |
msgid "Enter the email id to which the test email needs to be sent."
|
| 1332 |
msgstr ""
|
| 1333 |
|
| 1334 |
-
#: woocommerce-ac.php:
|
| 1335 |
msgid "Update Changes"
|
| 1336 |
msgstr ""
|
| 1337 |
|
| 1338 |
-
#: woocommerce-ac.php:
|
| 1339 |
msgid "If you love <strong>Abandoned Cart Lite for WooCommerce</strong>, then please leave us a <a href=\"https://wordpress.org/support/plugin/woocommerce-abandoned-cart/reviews/?rate=5#new-post\" target=\"_blank\" class=\"ac-rating-link\" data-rated=\"Thanks :)\">★★★★★</a> rating. Thank you in advance. :)"
|
| 1340 |
msgstr ""
|
| 1341 |
|
| 1342 |
-
#: woocommerce-ac.php:
|
| 1343 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1344 |
msgid "Men's Formal Shoes"
|
| 1345 |
msgstr ""
|
| 1346 |
|
| 1347 |
-
#: woocommerce-ac.php:
|
| 1348 |
-
#: woocommerce-ac.php:
|
| 1349 |
msgid "Woman's Hand Bags"
|
| 1350 |
msgstr ""
|
| 2 |
# This file is distributed under the same license as the Abandoned Cart Lite for WooCommerce plugin.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
+
"Project-Id-Version: Abandoned Cart Lite for WooCommerce 5.10.0\n"
|
| 6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/woocommerce-abandoned-cart\n"
|
| 7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
| 8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
| 12 |
+
"POT-Creation-Date: 2021-08-23T10:08:32+02:00\n"
|
| 13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
| 14 |
+
"X-Generator: WP-CLI 2.5.0\n"
|
| 15 |
"X-Domain: woocommerce-abandoned-cart\n"
|
| 16 |
|
| 17 |
#. Plugin Name of the plugin
|
| 34 |
msgid "http://www.tychesoftwares.com/"
|
| 35 |
msgstr ""
|
| 36 |
|
| 37 |
+
#: cron/class-wcal-cron.php:90
|
| 38 |
msgid "Abandoned cart reminder"
|
| 39 |
msgstr ""
|
| 40 |
|
| 41 |
+
#: cron/class-wcal-cron.php:295
|
| 42 |
#: woocommerce-ac.php:2964
|
| 43 |
+
#: woocommerce-ac.php:3786
|
| 44 |
+
#: woocommerce-ac.php:3821
|
| 45 |
msgid "Quantity"
|
| 46 |
msgstr ""
|
| 47 |
|
| 48 |
+
#: cron/class-wcal-cron.php:296
|
| 49 |
+
#: woocommerce-ac.php:3787
|
| 50 |
+
#: woocommerce-ac.php:3822
|
| 51 |
msgid "Price"
|
| 52 |
msgstr ""
|
| 53 |
|
| 54 |
+
#: cron/class-wcal-cron.php:297
|
| 55 |
#: woocommerce-ac.php:2965
|
| 56 |
+
#: woocommerce-ac.php:3788
|
| 57 |
+
#: woocommerce-ac.php:3823
|
| 58 |
msgid "Line Subtotal"
|
| 59 |
msgstr ""
|
| 60 |
|
| 61 |
+
#: cron/class-wcal-cron.php:302
|
| 62 |
+
#: cron/class-wcal-cron.php:313
|
| 63 |
+
#: woocommerce-ac.php:3782
|
| 64 |
+
#: woocommerce-ac.php:3816
|
| 65 |
msgid "Your Shopping Cart"
|
| 66 |
msgstr ""
|
| 67 |
|
| 68 |
+
#: cron/class-wcal-cron.php:304
|
| 69 |
+
#: cron/class-wcal-cron.php:315
|
| 70 |
#: woocommerce-ac.php:2962
|
| 71 |
+
#: woocommerce-ac.php:3784
|
| 72 |
+
#: woocommerce-ac.php:3819
|
| 73 |
msgid "Item"
|
| 74 |
msgstr ""
|
| 75 |
|
| 76 |
+
#: cron/class-wcal-cron.php:305
|
| 77 |
+
#: cron/class-wcal-cron.php:316
|
| 78 |
#: woocommerce-ac.php:2963
|
| 79 |
+
#: woocommerce-ac.php:3785
|
| 80 |
+
#: woocommerce-ac.php:3820
|
| 81 |
msgid "Name"
|
| 82 |
msgstr ""
|
| 83 |
|
| 84 |
+
#: cron/class-wcal-cron.php:339
|
| 85 |
+
#: cron/class-wcal-cron.php:371
|
| 86 |
msgid "SKU: "
|
| 87 |
msgstr ""
|
| 88 |
|
| 89 |
+
#: cron/class-wcal-cron.php:422
|
| 90 |
+
#: woocommerce-ac.php:3808
|
| 91 |
+
#: woocommerce-ac.php:3843
|
| 92 |
msgid "Cart Total:"
|
| 93 |
msgstr ""
|
| 94 |
|
| 95 |
+
#: cron/class-wcal-cron.php:434
|
| 96 |
msgid "Product no longer exists"
|
| 97 |
msgstr ""
|
| 98 |
|
| 99 |
+
#: cron/class-wcal-cron.php:647
|
| 100 |
+
#: cron/class-wcal-cron.php:716
|
| 101 |
#: includes/frontend/class-wcal-checkout-process.php:220
|
| 102 |
+
#: includes/frontend/class-wcal-checkout-process.php:557
|
| 103 |
msgid "This order was abandoned & subsequently recovered."
|
| 104 |
msgstr ""
|
| 105 |
|
| 199 |
#: includes/admin/class-wcap-add-cart-popup-modal.php:84
|
| 200 |
#: includes/admin/class-wcap-pro-settings.php:66
|
| 201 |
#: includes/admin/class-wcap-pro-settings.php:384
|
| 202 |
+
#: woocommerce-ac.php:3532
|
| 203 |
msgid "Save Changes"
|
| 204 |
msgstr ""
|
| 205 |
|
| 1319 |
msgid "Send this email:"
|
| 1320 |
msgstr ""
|
| 1321 |
|
| 1322 |
+
#: woocommerce-ac.php:3498
|
| 1323 |
msgid "after cart is abandoned."
|
| 1324 |
msgstr ""
|
| 1325 |
|
| 1326 |
+
#: woocommerce-ac.php:3505
|
| 1327 |
msgid "Send a test email to:"
|
| 1328 |
msgstr ""
|
| 1329 |
|
| 1330 |
+
#: woocommerce-ac.php:3514
|
| 1331 |
msgid "Enter the email id to which the test email needs to be sent."
|
| 1332 |
msgstr ""
|
| 1333 |
|
| 1334 |
+
#: woocommerce-ac.php:3528
|
| 1335 |
msgid "Update Changes"
|
| 1336 |
msgstr ""
|
| 1337 |
|
| 1338 |
+
#: woocommerce-ac.php:3554
|
| 1339 |
msgid "If you love <strong>Abandoned Cart Lite for WooCommerce</strong>, then please leave us a <a href=\"https://wordpress.org/support/plugin/woocommerce-abandoned-cart/reviews/?rate=5#new-post\" target=\"_blank\" class=\"ac-rating-link\" data-rated=\"Thanks :)\">★★★★★</a> rating. Thank you in advance. :)"
|
| 1340 |
msgstr ""
|
| 1341 |
|
| 1342 |
+
#: woocommerce-ac.php:3606
|
| 1343 |
+
msgid "Please enter a valid email."
|
| 1344 |
+
msgstr ""
|
| 1345 |
+
|
| 1346 |
+
#: woocommerce-ac.php:3792
|
| 1347 |
+
#: woocommerce-ac.php:3827
|
| 1348 |
msgid "Men's Formal Shoes"
|
| 1349 |
msgstr ""
|
| 1350 |
|
| 1351 |
+
#: woocommerce-ac.php:3799
|
| 1352 |
+
#: woocommerce-ac.php:3834
|
| 1353 |
msgid "Woman's Hand Bags"
|
| 1354 |
msgstr ""
|
includes/class-wcal-common.php
CHANGED
|
@@ -997,6 +997,8 @@ class wcal_common { // phpcs:ignore
|
|
| 997 |
$list_frequencies = array();
|
| 998 |
foreach ( $get_active as $active ) {
|
| 999 |
switch ( $active->day_or_hour ) {
|
|
|
|
|
|
|
| 1000 |
case 'Days':
|
| 1001 |
$template_freq = $active->frequency * $day_seconds;
|
| 1002 |
break;
|
|
@@ -1004,6 +1006,11 @@ class wcal_common { // phpcs:ignore
|
|
| 1004 |
$template_freq = $active->frequency * $hour_seconds;
|
| 1005 |
break;
|
| 1006 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1007 |
$list_frequencies[ $active->id ] = (int) $template_freq;
|
| 1008 |
}
|
| 1009 |
|
| 997 |
$list_frequencies = array();
|
| 998 |
foreach ( $get_active as $active ) {
|
| 999 |
switch ( $active->day_or_hour ) {
|
| 1000 |
+
case 'Minutes':
|
| 1001 |
+
$template_freq = $active->frequency * 60;
|
| 1002 |
case 'Days':
|
| 1003 |
$template_freq = $active->frequency * $day_seconds;
|
| 1004 |
break;
|
| 1006 |
$template_freq = $active->frequency * $hour_seconds;
|
| 1007 |
break;
|
| 1008 |
}
|
| 1009 |
+
|
| 1010 |
+
if ( ! isset( $template_freq ) ) {
|
| 1011 |
+
continue;
|
| 1012 |
+
}
|
| 1013 |
+
|
| 1014 |
$list_frequencies[ $active->id ] = (int) $template_freq;
|
| 1015 |
}
|
| 1016 |
|
includes/classes/class-wcal-templates-table.php
CHANGED
|
@@ -212,7 +212,7 @@ class WCAL_Templates_Table extends WP_List_Table {
|
|
| 212 |
$return_templates_data[ $i ]->sr = $i + 1;
|
| 213 |
$return_templates_data[ $i ]->id = $id;
|
| 214 |
$return_templates_data[ $i ]->template_name = $value->template_name;
|
| 215 |
-
$return_templates_data[ $i ]->sent_time = "$frequency $day_or_hour" . __( 'After Abandonment', 'woocommerce-abandoned-cart' );
|
| 216 |
$return_templates_data[ $i ]->activate = $active;
|
| 217 |
$return_templates_data[ $i ]->is_active = $is_active;
|
| 218 |
$i++;
|
| 212 |
$return_templates_data[ $i ]->sr = $i + 1;
|
| 213 |
$return_templates_data[ $i ]->id = $id;
|
| 214 |
$return_templates_data[ $i ]->template_name = $value->template_name;
|
| 215 |
+
$return_templates_data[ $i ]->sent_time = "$frequency $day_or_hour" .' '. __( 'After Abandonment', 'woocommerce-abandoned-cart' );
|
| 216 |
$return_templates_data[ $i ]->activate = $active;
|
| 217 |
$return_templates_data[ $i ]->is_active = $is_active;
|
| 218 |
$i++;
|
includes/frontend/class-wcal-checkout-process.php
CHANGED
|
@@ -439,6 +439,13 @@ if ( ! class_exists( 'Wcal_Checkout_Process' ) ) {
|
|
| 439 |
}
|
| 440 |
}
|
| 441 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 442 |
|
| 443 |
if ( 'pending' !== $woo_order_status && 'failed' !== $woo_order_status && 'cancelled' !== $woo_order_status && 'trash' !== $woo_order_status ) {
|
| 444 |
|
| 439 |
}
|
| 440 |
}
|
| 441 |
}
|
| 442 |
+
// in admin, return if status is not processing or completed without updating further.
|
| 443 |
+
if ( is_admin() && isset ( $_POST['order_status'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
|
| 444 |
+
$woo_order_status = sanitize_text_field( wp_unslash( $_POST['order_status'] ) );
|
| 445 |
+
if ( ! in_array( $woo_order_status, array( 'wc-processing', 'wc-completed' ) ) ) {
|
| 446 |
+
return $woo_order_status;
|
| 447 |
+
}
|
| 448 |
+
}
|
| 449 |
|
| 450 |
if ( 'pending' !== $woo_order_status && 'failed' !== $woo_order_status && 'cancelled' !== $woo_order_status && 'trash' !== $woo_order_status ) {
|
| 451 |
|
readme.txt
CHANGED
|
@@ -222,6 +222,12 @@ The admin can use the merge code `{{cart.unsubscribe}}' in the email templates.
|
|
| 222 |
6. Product Report Tab.
|
| 223 |
|
| 224 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 225 |
= 5.9.0 (26.07.2021) =
|
| 226 |
* Enhancement - Introduced UTM tags to be added to reminder email links to help with Google Analytics.
|
| 227 |
* Tweak - Added a filter to hide SKU in reminder emails.
|
| 222 |
6. Product Report Tab.
|
| 223 |
|
| 224 |
== Changelog ==
|
| 225 |
+
= 5.10.0 ( 25.08.2021) =
|
| 226 |
+
* Enhancement - Added the ability to setup reminder email frequency in minutes.
|
| 227 |
+
* Tweak - Added a filter to allow reminder emails to be sent for carts with the total as 0.
|
| 228 |
+
* Fix - The plugin tried to send a test email when the field was left blanks.
|
| 229 |
+
* Fix - Recovered order note was added for cancelled orders in WP Dashboard.
|
| 230 |
+
|
| 231 |
= 5.9.0 (26.07.2021) =
|
| 232 |
* Enhancement - Introduced UTM tags to be added to reminder email links to help with Google Analytics.
|
| 233 |
* Tweak - Added a filter to hide SKU in reminder emails.
|
woocommerce-ac.php
CHANGED
|
@@ -3,14 +3,14 @@
|
|
| 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: 5.
|
| 7 |
* Author: Tyche Softwares
|
| 8 |
* Author URI: http://www.tychesoftwares.com/
|
| 9 |
* Text Domain: woocommerce-abandoned-cart
|
| 10 |
* Domain Path: /i18n/languages/
|
| 11 |
* Requires PHP: 5.6
|
| 12 |
* WC requires at least: 3.0.0
|
| 13 |
-
* WC tested up to: 5.
|
| 14 |
*
|
| 15 |
* @package Abandoned-Cart-Lite-for-WooCommerce
|
| 16 |
*/
|
|
@@ -118,7 +118,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
| 118 |
}
|
| 119 |
|
| 120 |
if ( ! defined( 'WCAL_PLUGIN_VERSION' ) ) {
|
| 121 |
-
define( 'WCAL_PLUGIN_VERSION', '5.
|
| 122 |
}
|
| 123 |
|
| 124 |
if ( ! defined( 'WCAL_PLUGIN_PATH' ) ) {
|
|
@@ -584,7 +584,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
| 584 |
`body` mediumtext NOT NULL,
|
| 585 |
`is_active` enum('0','1') NOT NULL,
|
| 586 |
`frequency` int(11) NOT NULL,
|
| 587 |
-
`day_or_hour` enum('Days','Hours') NOT NULL,
|
| 588 |
`template_name` text NOT NULL,
|
| 589 |
`is_wc_template` enum('0','1') NOT NULL,
|
| 590 |
`default_template` int(11) NOT NULL,
|
|
@@ -3462,7 +3462,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
| 3462 |
if ( 'edittemplate' === $mode && count( $results ) > 0 && isset( $results[0]->frequency ) ) {
|
| 3463 |
$frequency_edit = $results[0]->frequency;
|
| 3464 |
}
|
| 3465 |
-
for ( $i = 1; $i <
|
| 3466 |
printf(
|
| 3467 |
"<option %s value='%s'>%s</option>\n",
|
| 3468 |
selected( $i, $frequency_edit, false ),
|
|
@@ -3480,6 +3480,7 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
| 3480 |
$days_or_hours_edit = $results[0]->day_or_hour;
|
| 3481 |
}
|
| 3482 |
$days_or_hours = array(
|
|
|
|
| 3483 |
'Days' => 'Day(s)',
|
| 3484 |
'Hours' => 'Hour(s)',
|
| 3485 |
);
|
|
@@ -3598,7 +3599,17 @@ if ( ! class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
| 3598 |
jQuery( document ).ready( function( $ )
|
| 3599 |
{
|
| 3600 |
$( "table#addedit_template input#preview_email" ).click( function()
|
| 3601 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3602 |
$( '.ajax_img' ).show();
|
| 3603 |
var email_body = '';
|
| 3604 |
if ( jQuery("#wp-woocommerce_ac_email_body-wrap").hasClass( "tmce-active" ) ) {
|
| 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: 5.10.0
|
| 7 |
* Author: Tyche Softwares
|
| 8 |
* Author URI: http://www.tychesoftwares.com/
|
| 9 |
* Text Domain: woocommerce-abandoned-cart
|
| 10 |
* Domain Path: /i18n/languages/
|
| 11 |
* Requires PHP: 5.6
|
| 12 |
* WC requires at least: 3.0.0
|
| 13 |
+
* WC tested up to: 5.6.0
|
| 14 |
*
|
| 15 |
* @package Abandoned-Cart-Lite-for-WooCommerce
|
| 16 |
*/
|
| 118 |
}
|
| 119 |
|
| 120 |
if ( ! defined( 'WCAL_PLUGIN_VERSION' ) ) {
|
| 121 |
+
define( 'WCAL_PLUGIN_VERSION', '5.10.0' );
|
| 122 |
}
|
| 123 |
|
| 124 |
if ( ! defined( 'WCAL_PLUGIN_PATH' ) ) {
|
| 584 |
`body` mediumtext NOT NULL,
|
| 585 |
`is_active` enum('0','1') NOT NULL,
|
| 586 |
`frequency` int(11) NOT NULL,
|
| 587 |
+
`day_or_hour` enum('Days','Hours','Minutes') NOT NULL,
|
| 588 |
`template_name` text NOT NULL,
|
| 589 |
`is_wc_template` enum('0','1') NOT NULL,
|
| 590 |
`default_template` int(11) NOT NULL,
|
| 3462 |
if ( 'edittemplate' === $mode && count( $results ) > 0 && isset( $results[0]->frequency ) ) {
|
| 3463 |
$frequency_edit = $results[0]->frequency;
|
| 3464 |
}
|
| 3465 |
+
for ( $i = 1; $i < 60; $i++ ) {
|
| 3466 |
printf(
|
| 3467 |
"<option %s value='%s'>%s</option>\n",
|
| 3468 |
selected( $i, $frequency_edit, false ),
|
| 3480 |
$days_or_hours_edit = $results[0]->day_or_hour;
|
| 3481 |
}
|
| 3482 |
$days_or_hours = array(
|
| 3483 |
+
'Minutes' => 'Minute(s)',
|
| 3484 |
'Days' => 'Day(s)',
|
| 3485 |
'Hours' => 'Hour(s)',
|
| 3486 |
);
|
| 3599 |
jQuery( document ).ready( function( $ )
|
| 3600 |
{
|
| 3601 |
$( "table#addedit_template input#preview_email" ).click( function()
|
| 3602 |
+
{
|
| 3603 |
+
emailVal = jQuery( '#send_test_email' ).val();
|
| 3604 |
+
const re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
|
| 3605 |
+
if ( !re.test( emailVal ) ) {
|
| 3606 |
+
jQuery( '#preview_email_sent_msg' ).html( '<?php echo __( 'Please enter a valid email.', 'woocommerce-abandoned-cart' ); ?>' );
|
| 3607 |
+
jQuery( '#preview_email_sent_msg' ).show();
|
| 3608 |
+
return false;
|
| 3609 |
+
}
|
| 3610 |
+
|
| 3611 |
+
jQuery( '#preview_email_sent_msg' ).hide();
|
| 3612 |
+
|
| 3613 |
$( '.ajax_img' ).show();
|
| 3614 |
var email_body = '';
|
| 3615 |
if ( jQuery("#wp-woocommerce_ac_email_body-wrap").hasClass( "tmce-active" ) ) {
|
