Support » Plugin: WooCommerce » Checkout not directing to Thank You page after checkout

  • Abes

    (@abri-coetzer)


    Hi, since the update, which has caused me massive headaches, a full day downtime on my site is a big loss. At least most things have been sorted.

    Last problem I cannot sort out. After completing checkout the client used to be directed to a “Thank You” or “Order received” page. Not anymore, the next page is “Cart” which states “There is no items in your cart.” I understand that there is now endpoints and no more pages, which is fine.

    But how do I fix this.

    I have flushed permalinks.

    Thank you in advance

    https://wordpress.org/plugins/woocommerce/

Viewing 15 replies - 1 through 15 (of 17 total)
  • Hi @abes, you need to check which payment plugin you are using that caused the redirection problem.

    In the plugin folder, open up the plugin php file, find a function called ‘process_payment()’, there should be have few lines under comment section ‘redirect to thank you page’:

    'redirect'        => $this->get_return_url( .... )

    Please make sure you are using this:

    'redirect'        => $this->get_return_url( $order )
    Thread Starter Abes

    (@abri-coetzer)

    Hi @terrytsang, thank you for your response.

    This happens when the client select Direct Bank Transfer (BACS) as payment. I assume it does the same when the use my payment gateway, have not checked that yet.

    You can have a look at http://www.mynunu.co.za if you would like. You can make a purchase using Direct Bank Transfer so you can maybe better see. Just use “test” on all the required fields, then I will pick up the order to delete it later.

    I am not an advance user by any means, but can make my way around the site, so bear with me so we can fix this.

    Thanks!

    I have a similar issue using authorize.net – instead of returning to the “Thank You page” it goes to a 404 page.

    This is the code I think you are saying to edit(?):
    }
    $redirect_url = get_site_url().’/checkout/order-received/’.$order->id.’/?key=’.$order->order_key;
    $this->web_redirect( $redirect_url); exit;
    }
    else{

    $redirect_url = get_site_url().’/checkout/order-received/’;
    $this->web_redirect($redirect_url.’?msg=Unknown_error_occured’);
    exit;
    }

    Hi @memyselfandmetoo, i think you need to contact authorize.net plugin developer as to follow latest WooCommerce latest payment gateway coding updates.

    Thread Starter Abes

    (@abri-coetzer)

    I see someone ran a test order. Could you figure out what is going on?

    I did figure out what the problem is. I just have to figure out how to fix it. The wordpress installation is in a sub directory… the site is at mydomain.com and the installation is at mydomain.com/wp/ — the page is resolving to the mydomain.com/wp/thankyou (note /wp/ directory) instead of mydomain.com/thankyou. Haven’t had a chance to work with it since I figured out the issue. Hoping to get to it in the next day or two.

    @terrytsang – Tried to contact – his site seems to be down. I see another person had issues and reached him through twitter – says he replied that he has personal problems and cannot help. Guess if I can’t figure out a way to direct to correct page will have to look for another solution.

    Thread Starter Abes

    (@abri-coetzer)

    Hi, could anyone figure out what is going on with my issue, which was the original thread? I cannot seem to figure out the problem. Tried everything in all the documentation, but to no avail. This is really hurting my site now.

    Hi @abes, Direct Bank Transfer payment method is built in WooCommerce payment or you added external plugin? Have you tried change to default WordPress theme and test again?

    Thread Starter Abes

    (@abri-coetzer)

    Hi @terrytsang, I cannot change my theme now, we are an active E-commerce site, so significant changes would be devastating, such as theme changes. Woocommerce worked perfect until the update to 2.1, so I recon it has to be the new endpoints. What am I missing with the endpoints, as I understand, there is not much that I need to do, it should work automatically?

    Hi @abes, i have encountered this issue before when i am using a custom payment method plugin that return the success url that was broken for v2.1. I have changed that and it worked then. I am not sure whether is happen to you too, or because it is a theme problem or plugin problem.

    Thread Starter Abes

    (@abri-coetzer)

    I wonder what it can be, but it does not seem as if any one else can offer a solution.

    I hope it is not the theme, as I cannot change theme, but it worked perfect before the update, which does not make sense. The BACS I am using is the built in payment method for WC, so this should not be the problem. Maybe I changed something I should not have.

    Hi @abes, can you check inside your theme folder whether have “woocommerce” folder? If yes, do rename that to “_woocommerce” and see how it goes then?

    Thread Starter Abes

    (@abri-coetzer)

    Thanks for idea, but unfortunately that did not work. I will try and play around tonight again, maybe I just might break it back.

    Did you ever try your other payment methods to see if it returns to the thank you page. In my case it was only the authorize.net plugin that had an issue redirecting to the correct page.

    I switched to another developer and it worked correctly so I know it was something in the plugin code that the developer did not update after the latest release.

    I suspect you’re in the same situation. Maybe try doing a second installation in another directory using a working version of DBT and see if you can compare the code to see what changed with the new release?

    Good luck.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Checkout not directing to Thank You page after checkout’ is closed to new replies.