Support » Plugin: Abandoned Cart Lite for WooCommerce » Bug with populating guest saved fields

  • Resolved urikanonov

    (@urikanonov)


    Hi,

    I’m using plugin version: 5.1.3

    You have a serious bug (added in recent versions) with populating the guest fields from the “saved data” on checkout.

    in wcal_class-guest.php, “save_data” function, you save the data into billing_* field names, for example:

    if ( isset($_POST[‘billing_email’]) && $_POST[‘billing_email’] != ” ) {
    wcal_common::wcal_set_cart_session( ‘billing_email’, $_POST[‘billing_email’] );
    }

    BUT in “guest_checkout_fields” function, you use guest_* fields names:

    if ( wcal_common::wcal_get_cart_session( ‘guest_email’ ) != “” ) {
    $_POST[‘billing_email’] = wcal_common::wcal_get_cart_session( ‘guest_email’ );
    }

    So you put the data in the session as “billing_email” but look it up as “guest_email”! Save for the other fields.

    Please fix this asap!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author chetnapatel

    (@chetnapatel)

    Hi,

    Thank you so much for sharing your query with the code.

    In the save_data function,

    We set the session for billing_email of guest user once they enter the email address on the checkout page.

    In the same function, you will be able to see that we are getting that billing_email from the session to store the information in the database.

    In the “guest_checkout_fields” function,

    We are getting “guest_email” from session to populate email address on the checkout page and the same email address is already set in the session once the user comes to the site from email notification. You can see it in “wcal_email_track_links” function of “woocommerce-ac.php” file.

    Can I know how is it affecting on your site? So, we can have a look into it in detail.

    Regards,
    Chetna Bhutka

    But if the user writes the mail in the checkout page but then navigates away from it, you won’t repopulate it because it’s saved under billing_email.

    What reason do you have to same the same data once under guest_mail and once under billing_email? Previously it was always guest_email…

    Plugin Author chetnapatel

    (@chetnapatel)

    Hi,

    The reason was that if the cart is abandoned then the session set with billing_email. And if someone updates the cart after abandoning then cart information was added in the database. And once we populate the cart information on the checkout page, we get the updated cart information from the session which we have set from the database.

    Yes, I agree with you that it should not be repopulated as it was already in the billing_email. I will make the changes in our next plugin update and will inform you here we release the plugin.

    Regards,
    Chetna Bhutka

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug with populating guest saved fields’ is closed to new replies.