• Resolved alx359

    (@alx359)


    Think have found a bug.

    Concerns the page chosen to render the [woocommerce_order_tracking] shortcode (e.g. https://domain.com/tracking).

    After a customer enters the required data to review an order (i.e. order number and billing email), it shows the order details, and also renders a handy button to Order again.

    However, said button for guest customers redirects to an empty cart. The expected behavior is for the cart to be repopulated with the order under review, but it happens only for a customer when he/she is logged in (*).

    As a workaround, I have overridden the order/order-again.php template to render the button only for logged in customers.

    (*) Tested with 2021 theme + WooCommerce, with Health Check plugin in Troubleshooting mode.

    HTH.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @alx359

    I understand that the Order again button for a logged in customer redirects to an empty cart for guest customers.

    The expected behavior is for the cart to be repopulated with the order under review, but it happens only for a customer when he/she is logged in

    This is because the system is not storing the details of the order from a guest. If the guest creates an account during checkout, then his order details will be showing as expected. You can read more on controlling account settings related to guest checkouts here: https://woocommerce.com/document/configuring-woocommerce-settings/#accounts-and-privacy-settings

    Thread Starter alx359

    (@alx359)

    Hi Margaret,

    I reviewed the link, and everything relevant to guests was already checked.

    I also re-checked my bug report, and realized my initial assessment was misleading.

    The “order again” button still renders for guest orders that produce empty carts, but that happens as I was testing logged into my account as admin. The expected behavior still would be to render said button depending on the $user->ID that made the order, inferring from such ID if the order data was stored for retrieval, as you said.

    While logged as admin from the tracking page, also have checked orders made by other registered customers. The “order again” renders but still produces empty carts (at least for the few orders have checked so far). If logged as said registered customer, the “order again” functionality works as expected. That’s confusing. Button render issue aside, shouldn’t an admin get access to all such stored orders anyway?

    Thanks.

    Saif

    (@babylon1999)

    Hello @alx359,

    The “order again” button still renders for guest orders that produce empty carts, but that happens as I was testing logged into my account as admin.

    The button should only render if you’re tracking the order from the account you placed it from. Meaning, if you track the order of one of your customers while logging in as an admin you shouldn’t see it.

    Screenshot as a guest: https://i.imgur.com/30Vm2Zo.png

    Screenshot as an admin checking one of my customers: https://i.imgur.com/UnpHKG9.png

    The same goes if someone orders something as a guest and refuses to create a new account while ordering.

    Screenshot: https://i.imgur.com/LiLMQwu.png

    So the fact you see the button while not logged in is a problem in itself. Can you please remove any custom snippets you’ve entered, switch to the Storefront theme and check if you see the button while submitting the form as a guest?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[bug] Can’t reorder for guests’ is closed to new replies.