Support » Plugin: WooCommerce » Not redirecting to thank you page

  • Resolved rocketmena

    (@rocketmena)


    Hello,

    We are stuck in a very unusual issue. First, we have added the custom URL for the thank you page. Now, we don’t want that custom page because of some payment issues. We deleted the code for the custom thank you page but still, it’s not going to the default thank you page.

    Can you people help us in getting the default thank you page again?

Viewing 7 replies - 1 through 7 (of 7 total)
  • rocketmena

    (@rocketmena)

    Can anyone help here, please?

    Plugin Support Amanda

    (@amandasjackson)

    Hi @rocketmena

    You’ll want to make sure that the end point in WooCommerce>Settings>Advanced is correct


    Link to image: https://cld.wthms.co/A9krJk

    rocketmena

    (@rocketmena)

    Yes, endpoint is same only for our case. (order-received )

    rafflesprovident

    (@rafflesprovident)

    Can I know whats the code you used to redirect to your custom thank you page?

    rocketmena

    (@rocketmena)

    add_action(‘woocommerce_thankyou’, ‘bbloomer_redirectcustom’);

    function bbloomer_redirectcustom($order_id) {
    $order = wc_get_order($order_id);
    if (!$order->has_status(‘failed’)) {
    $order->get_checkout_order_received_url();
    exit;
    }
    }

    Plugin Support Hari Shanker R

    (@harishanker)

    Automattic Happiness Engineer

    Hi @rocketmena

    Thanks for sharing that custom code you had used.

    This probably is a caching issue, or a permalink issue. If you have any caching plugins in your site, or if your web server supports server-side caching, could you flush them all?

    Additionally, could you go to **Settings > Permalinks** and change the permalinks back to default first, and then set it back to the previous settings? This could probably fix the problem.

    Let us know how that went.

    Plugin Support Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Howdy!

    We haven’t heard back from you in a while, so I’m going to go ahead and mark this thread as resolved. If you have any other questions please start a new thread.

    Cheers!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.