Any ideas why woocommerce redirect to 404 message?

Any idea why my woocommerce shop redirect to the following URL: http://website.com/checkout/order-received/092/?key=order_53278f779fde2 instead of: http://website.com/checkout/order-received/ ?

I would love a redirect function that can do that. here is what I am thinking:

Read More
add_function_woocommerce_redirect_url_something

I have also tried to change the permalinks with no luck!!

Related posts

Leave a Reply

3 comments

  1. add_filter('woocommerce_get_checkout_order_received_url','my_order_received_url',0,2);
    function my_order_received_url($return_url,$order){
        $return_url = str_replace('?','&',$return_url);
        $return_url = str_replace('/order-received/','/?order-received=',$return_url);
        return $return_url;
    }
    
  2. add_filter('woocommerce_get_checkout_order_received_url','my_order_received_url',0,2);
    function my_order_received_url($return_url, $order){
        if( preg_match('~/order-received/d+?~', $return_url) ){
            $return_url = str_replace('?','&',$return_url);
            $return_url = str_replace('/order-received/','/?order-received=',$return_url);
        }
        return $return_url;
    }