• Hey!

    I’ve been trying to fix this for months. Guest users completing checkout will be prompted with a blank page asking them to log in to view their order. Logged in user won’t have this issue.

    I’ve tried PHP snippets:

    ‘woocommerce_order_email_verification_required’, ‘__return_false’, 99 );

    add_filter( ‘woocommerce_order_email_verification_required’, ‘__return_false’ );

    As well as User Verification plugin to disable email verification. The support for my checkout plugin also have no clue what’s happening and said to contact WC support. Problem appears to present even with the checkout plugin disabed.

    Any help would be appreciated 🙂

Viewing 12 replies - 16 through 27 (of 27 total)
  • Thread Starter kibitzz

    (@kibitzz)

    Hey!

    I’m honestly not sure what’s going on with that. It seems with that checkout plugin as well as all other plugins disabled, it does display correctly: https://snipboard.io/OfBtwl.jpg

    This is the case with both incognito and normal Chrome.

    However, when the plugin devs attempt the same thing they get this: https://www.loom.com/i/46aff5c803654ba8aa237ef5627b33ab

    I have no idea what’s going on hahhaaaa

    Plugin Support anastas10s (woo-hc)

    (@anastas10s)

    Thank you for reaching back, with further details on this @kibitzz .

    It seems with that checkout plugin as well as all other plugins disabled, it does display correctly: https://snipboard.io/OfBtwl.jpg

    That’s great to hear! It means there is no issue with only the WooCommerce plugin enabled, so our job here is done essentially.

    However, when the plugin devs attempt the same thing they get this: https://www.loom.com/i/46aff5c803654ba8aa237ef5627b33ab

    As the screenshot displays a different layout than the one linked above, it showcases that further functionality is enabled, which falls outside the scope of support provided here, I’m afraid. Kindly revert to the support channel of the checkout plugin in use at your store.

    I hope this helps! Thank you.

    @kibitzz This issue occurs because order details are not available on the thank-you page for non-logged-in users, causing it to call a different template: woocommerce/templates/checkout/order-received.php. To fix this issue, you need to override the template by copying it to yourtheme/woocommerce/order/order-details.php. Then, copy the code from your thankyou.php file code into order-details.php and add the following code below the defined( 'ABSPATH' ) || exit; line (https://prnt.sc/aEhKOPB56tu7) :

    global $wp;
    if ( isset($wp->query_vars['order-received']) ) {
    $order_id = absint($wp->query_vars['order-received']); // The order ID
    $order = wc_get_order( $order_id ); // The WC_Order object
    }

    This solution will resolve the issue.

    Thread Starter kibitzz

    (@kibitzz)

    Hey Mudit!

    Thanks so much for the advice, I tried implementing but it seems that the issue is still appearing:
    https://snipboard.io/0lOYqP.jpg

    Here is the file directory I made within my child theme:

    https://snipboard.io/KTIUao.jpg

    I copied everything from my woocommerce thankyou.php file into the order-details.php file within the child theme, including replacing everything from the original order-received.php file from the woocommerce plugin file, and I added the code below defined( ‘ABSPATH’ ) || exit;

    Did I do something wrong do you think?

    Thanks 🙂


    I have checked your screenshots. You did it wrong.

    Step 1: Copy order-received.php and thankyou.php from your WooCommerce directory (plugins/woocommerce/templates/checkout) to this path: astra-child/woocommerce/checkout

    Step 2: add the following code in astra-child/woocommerce/checkout/order-received.php below the defined( 'ABSPATH' ) || exit; line (https://prnt.sc/aEhKOPB56tu7) :

    global $wp;
    if ( isset($wp->query_vars['order-received']) ) {
    $order_id = absint($wp->query_vars['order-received']); // The order ID
    $order = wc_get_order( $order_id ); // The WC_Order object
    }

    If you are still unable to configure this, please share the details with me and I will do it for you, free of cost 😉

    Thread Starter kibitzz

    (@kibitzz)

    Hey Mudit, thanks so much for the help.

    Does this look right to you? https://snipboard.io/FGJqLx.jpg

    I’ve noticed after implementing that code, the thank you page is visible on some orders (https://snipboard.io/JncAHa.jpg), but not others. It’s usually visible when opened in a normal window, but not always. All caches have been cleared multiple times.

    It’s usually broken when opened in an incognito window (https://snipboard.io/bn746Q.jpg), but sometimes instead of the login screen, I get a prompt to verify the associated email address: https://snipboard.io/xqRKM7.jpg

    Once the email is entered, the thank you page will display correctly.

    I’ve noticed with the broken page, it will display a login section in incognito (https://snipboard.io/bn746Q.jpg) but if viewed in normal browser window, it will not display the login field (https://snipboard.io/ewimGz.jpg). This is the same thank you page in both screenshots. Not sure if that helps at all.

    I want to note that this error only appears on certain orders. I placed 5 test orders in a row with about a 5 minute gap between each, the first one displayed the thank you page fine and then the rest failed to display the thank you page. They were all from the same IP address so I’m not sure if it’s firewall related or not. I am soooooo confused.

    Mudit Kumawat

    (@mudit-kumawat)

    You should read my message properly first. I did not mention anything about the order-details.php file, you need to do the coding in the order-received.php file.

    Thread Starter kibitzz

    (@kibitzz)

    You definitely said order details in the first message, no worries though

    To fix this issue, you need to override the template by copying it to yourtheme/woocommerce/order/order-details.php. Then, copy the code from your thankyou.php file code into order-details.php and add the following code below the defined( 'ABSPATH' ) || exit; line

    Unless you meant something else by that, in which case apologies, I have no idea what I’m doing.

    I’ve swapped the order details file for order received, and copied the code from thankyou.php as well as the snippet you mentioned in. All caches cleared but the issue still presents from what I can see. Take a look: https://snipboard.io/MoqR6s.jpg

    Thanks for the patience 🙂

    Mudit Kumawat

    (@mudit-kumawat)

    Ok, share your website detail with me, I will fix this issue.

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hello 👋 @mudit-kumawat,

    Thanks for your willingness to assist fellow community members. However, I’m just curious on what you mean by website details?

    @kibitzz, as this is a public forum, I would advise refraining from sharing any site credentials.

    Yes, we all know this is a public forum, and they will not share any site credentials here. Is there any option for them to contact us to fix this issue?

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @mudit-kumawat,

    Is there any option for them to contact us to fix this issue?

    I’m afraid there is no option for them to contact you through this forum.

Viewing 12 replies - 16 through 27 (of 27 total)
  • You must be logged in to reply to this topic.