WordPress.org

Forums

WooCommerce - excelling eCommerce
Where is the thank you page? (9 posts)

  1. alucard001
    Member
    Posted 1 year ago #

    I am using WC 2.1.2

    After doing my research, it seems that WC are changing the endpoint function, which will affect most of 3rd parties payment gateway.

    I have tried "installed missing page" in WC system setting already, but the thank you page is not created.

    Now my questions: where can I find reference and which part should I change the payment gateway plugin to redirect user to thank you page again?

    Thanks.

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

  2. Daniel Espinoza
    Member
    Posted 1 year ago #

    RĂ©mi Corson wrote a good post about endpoints and short codes. It's here.

    Which payment gateway are you using?

  3. alucard001
    Member
    Posted 1 year ago #

    Thanks, I am developing my own payment gateway called GMO.

  4. Daniel Espinoza
    Member
    Posted 1 year ago #

    I'd suggest reviewing the PayPal Standard gateway code if the GMO gateway is a redirect gateway.

    If it is a standard direct (customer stays on the Checkout page) gateway I'd suggest buying the Stripe gateway and see how it works.

    There isn't a good tutorial on building WC gateways, but one is in the works.

  5. alucard001
    Member
    Posted 1 year ago #

    Your feedback did remind me about reviewing how WC handle paypal code. Actually, my client's problem is that after customer checking out, they are still in the checkout page but not thank you page.

    I wonder if WC Paypal (the latest version) fixed this problem.

    By the way, GMO works quite similar to Paypal, GMO is doing internal REST call, not going to a particular UI like paypal.

    Thanks anyway.

  6. Daniel Espinoza
    Member
    Posted 1 year ago #

    I'm not sure what the exact issue is in your code, but here's a gist of what should happen after a payment is approved:

    https://gist.github.com/growdev/8674326

    <?php
                                            // Add a note to the order.  Put return code here if needed.
                                            $order->add_order_note( __('Payment completed', 'woocommerce')  );
    
                                            // Mark the order as complete
                                            $order->payment_complete();
    
                                            // Empty the cart
                                            $woocommerce->cart->empty_cart();
    
                                            // Empty awaiting payment session
                                            unset( $woocommerce->session->order_awaiting_payment );
    
                                            // Return thank you redirect
                                            return array(
                                                    'result'         => 'success',
                                                    'redirect'        => $this->get_return_url( $order )
                                            );
  7. alucard001
    Member
    Posted 1 year ago #

    I found the same code also. And actually I create a blank page with slug "order-received".

    However, that page is just a plain static page without necessary thank you page content.

    So how do I link up the "thankyou.php" content inside "order-received"?

  8. Phil001
    Member
    Posted 5 months ago #

    Hi,
    Could you possibly help me by telling me how I can set up an on-screen message that says:
    "Thank you for registering, you will receive an email with your password and login details shortly"

    This obviously needs to be once a new customer has entered their details, but I can't find any tech notes on how to add this simple message anywhere.

    Thanks

  9. chaostica
    Member
    Posted 3 months ago #

    I've had the order-received endpoint fail with WooCommerce. It's been returning me to an empty cart page. I couldn't even get a redirect to work.

    But I found a solution. If I deactivate WordPress SEO by Yeost it works. For the moment I've replaced WordPress SEO with All in One SEO. But I kinda like the Yeost product and am hoping to find a solution.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic