Hi All,
You can fix the issue as below by changing the code from line number 1743 to 1783 in the same “woocommerce-ac.php” file of our plugin. It is located at “woocommerce-abandoned-cart” core folder of our plugin.
if ( isset( $current_woo_cart['cart'] ) && isset( $abandoned_cart_arr['cart'] ) ) {
$temp_variable = "";
if ( count( $current_woo_cart['cart'] ) >= count( $abandoned_cart_arr['cart'] ) ) {
//do nothing
} else {
$temp_variable = $current_woo_cart;
$current_woo_cart = $abandoned_cart_arr;
$abandoned_cart_arr = $temp_variable;
}
if ( is_array( $current_woo_cart ) && is_array( $abandoned_cart_arr ) ) {
foreach ( $current_woo_cart as $key => $value ) {
foreach ( $value as $item_key => $item_value ) {
$current_cart_product_id = $item_value['product_id'];
$current_cart_variation_id = $item_value['variation_id'];
$current_cart_quantity = $item_value['quantity'];
if ( isset( $abandoned_cart_arr[$key][$item_key]['product_id'] ) ) {
$abandoned_cart_product_id = $abandoned_cart_arr[$key][$item_key]['product_id'];
} else {
$abandoned_cart_product_id = "";
}
if ( isset( $abandoned_cart_arr[$key][$item_key]['variation_id'] ) ) {
$abandoned_cart_variation_id = $abandoned_cart_arr[$key][$item_key]['variation_id'];
} else {
$abandoned_cart_variation_id = "";
}
if ( isset( $abandoned_cart_arr[$key][$item_key]['quantity'] ) ) {
$abandoned_cart_quantity = $abandoned_cart_arr[$key][$item_key]['quantity'];
} else {
$abandoned_cart_quantity = "";
}
if ( ( $current_cart_product_id != $abandoned_cart_product_id ) ||
( $current_cart_variation_id != $abandoned_cart_variation_id ) ||
( $current_cart_quantity != $abandoned_cart_quantity ) )
{
return false;
}
}
}
}
}
return true;
Can you please change the code and let me know if the issue fixed or not?
Please let me know if you have any further queries.
Regards,
Chetna Bhutka