Version Description
(25.07.2017) =
This version has 1 bug fix.
Bug Fixed - When WooCommerce is deactivated and "Allow" button is clicked from the user tracking data notice. It was redirecting to a blank page. Now, if WooCommerce is deactivated then Abandoned cart lite plugin will be automatically deactivated & display the notice.
Download this release
Release Info
Developer | bhavik.kiri |
Plugin | Abandoned Cart Lite for WooCommerce |
Version | 4.2 |
Comparing to | |
See all releases |
Code changes from version 4.1 to 4.2
- readme.txt +14 -0
- woocommerce-ac.php +81 -27
readme.txt
CHANGED
@@ -100,6 +100,8 @@ Abandoned Cart Plugin relies on a function called WP-Cron, and this function onl
|
|
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 |
|
104 |
== Installation ==
|
105 |
|
@@ -178,6 +180,12 @@ You can refer **[here](https://www.tychesoftwares.com/differences-between-pro-an
|
|
178 |
|
179 |
== Changelog ==
|
180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
= 4.1 (11.07.2017) =
|
182 |
|
183 |
* This version has 1 bug fix.
|
@@ -451,6 +459,12 @@ For existing users, this setting will remain unchecked. For new users of the plu
|
|
451 |
|
452 |
== Upgrade Notice ==
|
453 |
|
|
|
|
|
|
|
|
|
|
|
|
|
454 |
= 4.1 (11.07.2017) =
|
455 |
|
456 |
* This version has 1 bug fix.
|
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 |
+
4. **[WooCommerce Print Invoice & Delivery Note](https://wordpress.org/plugins/woocommerce-delivery-notes/ "WooCommerce Print Invoice & Delivery Note")**
|
104 |
+
|
105 |
|
106 |
== Installation ==
|
107 |
|
180 |
|
181 |
== Changelog ==
|
182 |
|
183 |
+
= 4.2 (25.07.2017) =
|
184 |
+
|
185 |
+
* This version has 1 bug fix.
|
186 |
+
|
187 |
+
* Bug Fixed - When WooCommerce is deactivated and "Allow" button is clicked from the user tracking data notice. It was redirecting to a blank page. Now, if WooCommerce is deactivated then Abandoned cart lite plugin will be automatically deactivated & display the notice.
|
188 |
+
|
189 |
= 4.1 (11.07.2017) =
|
190 |
|
191 |
* This version has 1 bug fix.
|
459 |
|
460 |
== Upgrade Notice ==
|
461 |
|
462 |
+
= 4.2 (25.07.2017) =
|
463 |
+
|
464 |
+
* This version has 1 bug fix.
|
465 |
+
|
466 |
+
* Bug Fixed - When WooCommerce is deactivated and "Allow" button is clicked from the user tracking data notice. It was redirecting to a blank page. Now, if WooCommerce is deactivated then Abandoned cart lite plugin will be automatically deactivated & display the notice.
|
467 |
+
|
468 |
= 4.1 (11.07.2017) =
|
469 |
|
470 |
* This version has 1 bug fix.
|
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: 4.
|
7 |
Author: Tyche Softwares
|
8 |
Author URI: http://www.tychesoftwares.com/
|
9 |
Text Domain: woocommerce-ac
|
@@ -240,6 +240,57 @@ if( !class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
240 |
|
241 |
add_action( 'admin_notices', array( 'Wcal_Admin_Notice', 'wcal_pro_notice' ) );
|
242 |
add_action( 'admin_init', array( 'Wcal_Admin_Notice', 'wcal_pro_notice_ignore' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
}
|
244 |
|
245 |
public static function wcal_order_placed( $order_id ) {
|
@@ -3080,37 +3131,40 @@ if( !class_exists( 'woocommerce_abandon_cart_lite' ) ) {
|
|
3080 |
<?php
|
3081 |
}
|
3082 |
}
|
|
|
3083 |
function wcal_admin_footer_text( $footer_text ) {
|
3084 |
if ( ! current_user_can( 'manage_woocommerce' ) ) {
|
3085 |
return;
|
3086 |
}
|
3087 |
-
|
3088 |
-
|
3089 |
-
|
3090 |
-
|
3091 |
-
|
3092 |
-
|
3093 |
-
|
3094 |
-
if ( isset( $wc_pages['user-edit'] ) ) {
|
3095 |
-
unset( $wc_pages['user-edit'] );
|
3096 |
-
}
|
3097 |
-
$wc_pages = array_flip( $wc_pages );
|
3098 |
-
$wc_pages[] = 'woocommerce_page_woocommerce_ac_page';
|
3099 |
-
// Check to make sure we're on a WooCommerce admin page
|
3100 |
-
if ( isset( $current_screen->id ) && apply_filters( 'woocommerce_display_admin_footer_text', in_array( $current_screen->id, $wc_pages ) ) ) {
|
3101 |
-
// Change the footer text
|
3102 |
-
if ( ! get_option( 'woocommerce_admin_footer_text_rated' ) ) {
|
3103 |
-
$footer_text = sprintf( __( 'If you like <strong>Abandoned Cart Lite for WooCommerce</strong> then please <a href="https://wordpress.org/support/plugin/woocommerce-abandoned-cart/reviews/">leave a review </a> for us and let us know how we are doing. A review will help us immensely.', 'woocommerce-ac' ) );
|
3104 |
-
wc_enqueue_js( "
|
3105 |
-
jQuery( 'a.wc-rating-link' ).click( function() {
|
3106 |
-
jQuery.post( '" . WC()->ajax_url() . "', { action: 'woocommerce_rated' } );
|
3107 |
-
jQuery( this ).parent().text( jQuery( this ).data( 'rated' ) );
|
3108 |
-
});
|
3109 |
-
" );
|
3110 |
-
} else {
|
3111 |
-
$footer_text = __( 'Thank you for selling with Abandoned Cart Lite for WooCommerce.', 'woocommerce-ac' );
|
3112 |
}
|
3113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3114 |
return $footer_text;
|
3115 |
}
|
3116 |
|
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: 4.2
|
7 |
Author: Tyche Softwares
|
8 |
Author URI: http://www.tychesoftwares.com/
|
9 |
Text Domain: woocommerce-ac
|
240 |
|
241 |
add_action( 'admin_notices', array( 'Wcal_Admin_Notice', 'wcal_pro_notice' ) );
|
242 |
add_action( 'admin_init', array( 'Wcal_Admin_Notice', 'wcal_pro_notice_ignore' ) );
|
243 |
+
|
244 |
+
/* @since: 4.2
|
245 |
+
* Check if WC is enabled or not.
|
246 |
+
*/
|
247 |
+
add_action( 'admin_init', array( &$this, 'wcal_wc_check_compatibility' ) );
|
248 |
+
}
|
249 |
+
|
250 |
+
/**
|
251 |
+
* @since: 4.2
|
252 |
+
* Check if WC is active or not.
|
253 |
+
*/
|
254 |
+
public static function wcal_wc_check_ac_installed() {
|
255 |
+
|
256 |
+
if ( is_plugin_active( 'woocommerce/woocommerce.php' ) && class_exists( 'WooCommerce' ) ) {
|
257 |
+
return true;
|
258 |
+
} else {
|
259 |
+
return false;
|
260 |
+
}
|
261 |
+
}
|
262 |
+
|
263 |
+
/**
|
264 |
+
* @since: 4.2
|
265 |
+
* Ensure that the Abandoned cart lite get deactivated when WC is deactivated.
|
266 |
+
*/
|
267 |
+
public static function wcal_wc_check_compatibility() {
|
268 |
+
|
269 |
+
if ( ! self::wcal_wc_check_ac_installed() ) {
|
270 |
+
|
271 |
+
if ( is_plugin_active( plugin_basename( __FILE__ ) ) ) {
|
272 |
+
deactivate_plugins( plugin_basename( __FILE__ ) );
|
273 |
+
|
274 |
+
add_action( 'admin_notices', array( 'woocommerce_abandon_cart_lite', 'wcal_wc_disabled_notice' ) );
|
275 |
+
if ( isset( $_GET['activate'] ) ) {
|
276 |
+
unset( $_GET['activate'] );
|
277 |
+
}
|
278 |
+
|
279 |
+
}
|
280 |
+
|
281 |
+
}
|
282 |
+
}
|
283 |
+
/**
|
284 |
+
* @since: 4.2
|
285 |
+
* Display a notice in the admin Plugins page if the Abandoned cart lite is
|
286 |
+
* activated while WC is deactivated.
|
287 |
+
*/
|
288 |
+
public static function wcal_wc_disabled_notice() {
|
289 |
+
|
290 |
+
$class = 'notice notice-error is-dismissible';
|
291 |
+
$message = __( 'Abandoned Cart Lite for WooCommerce requires WooCommerce installed and activate.', 'woocommerce-ac' );
|
292 |
+
|
293 |
+
printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message );
|
294 |
}
|
295 |
|
296 |
public static function wcal_order_placed( $order_id ) {
|
3131 |
<?php
|
3132 |
}
|
3133 |
}
|
3134 |
+
|
3135 |
function wcal_admin_footer_text( $footer_text ) {
|
3136 |
if ( ! current_user_can( 'manage_woocommerce' ) ) {
|
3137 |
return;
|
3138 |
}
|
3139 |
+
if ( self::wcal_wc_check_ac_installed() ) {
|
3140 |
+
$current_screen = get_current_screen();
|
3141 |
+
$wc_pages = wc_get_screen_ids();
|
3142 |
+
// Set only wc pages
|
3143 |
+
$wc_pages = array_flip( $wc_pages );
|
3144 |
+
if ( isset( $wc_pages['profile'] ) ) {
|
3145 |
+
unset( $wc_pages['profile'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3146 |
}
|
3147 |
+
if ( isset( $wc_pages['user-edit'] ) ) {
|
3148 |
+
unset( $wc_pages['user-edit'] );
|
3149 |
+
}
|
3150 |
+
$wc_pages = array_flip( $wc_pages );
|
3151 |
+
$wc_pages[] = 'woocommerce_page_woocommerce_ac_page';
|
3152 |
+
// Check to make sure we're on a WooCommerce admin page
|
3153 |
+
if ( isset( $current_screen->id ) && apply_filters( 'woocommerce_display_admin_footer_text', in_array( $current_screen->id, $wc_pages ) ) ) {
|
3154 |
+
// Change the footer text
|
3155 |
+
if ( ! get_option( 'woocommerce_admin_footer_text_rated' ) ) {
|
3156 |
+
$footer_text = sprintf( __( 'If you like <strong>Abandoned Cart Lite for WooCommerce</strong> then please <a href="https://wordpress.org/support/plugin/woocommerce-abandoned-cart/reviews/">leave a review </a> for us and let us know how we are doing. A review will help us immensely.', 'woocommerce-ac' ) );
|
3157 |
+
wc_enqueue_js( "
|
3158 |
+
jQuery( 'a.wc-rating-link' ).click( function() {
|
3159 |
+
jQuery.post( '" . WC()->ajax_url() . "', { action: 'woocommerce_rated' } );
|
3160 |
+
jQuery( this ).parent().text( jQuery( this ).data( 'rated' ) );
|
3161 |
+
});
|
3162 |
+
" );
|
3163 |
+
} else {
|
3164 |
+
$footer_text = __( 'Thank you for selling with Abandoned Cart Lite for WooCommerce.', 'woocommerce-ac' );
|
3165 |
+
}
|
3166 |
+
}
|
3167 |
+
}
|
3168 |
return $footer_text;
|
3169 |
}
|
3170 |
|