• Resolved nasirwp

    (@nasirwp)


    I have a big issue with woocoomerce order,
    When customer something order> checkout the url going to wp-admin
    [[wp-login.php?redirect_to=https%3A%2F%2Fwww.mywebsite.com%2Fwp-admin%2F&reauth=1]]
    Also, i did for checkout and redirect to other pages.

    
    add_action( 'woocommerce_thankyou', 'thankyou_redirectcustom');
    function thankyou_redirectcustom( $order_id ){
        $order = wc_get_order( $order_id );
        $url = 'https://mywebsite.com/business-info/';
        if ( ! $order->has_status( 'failed' ) ) {
            wp_safe_redirect( $url );
            exit;
        }
    }
    

    I am really so much upset, why the issue, and how can i fix the issue?
    #developers

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @nasirwp ,

    Okay, to understand the problem let’s go through the basic setups –

    1. Make sure you have a page created with this shortcode – [woocommerce_checkout]
    2. Make sure this page is selected in your WooCommerce > Settings > Advanced > Page setup > Checkout Page

    This should be enough to show your checkout page properly.

    If you have all of these set but still having the issue, you can go for a conflict test. This will make sure any of your theme or plugin is not causing the problem.

    Let me know how it goes with the tests.

    You can share your WooCommerce configuration status from wp-admin > WooCommerce > Status page use the button marked in this screenshot, then use the copy for support button to understand the problem better.

    Thank you ??

    Hi there,

    We’ve not heard back from you in a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Thank you ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘When customer something order> checkout the url going to wp-admin’ is closed to new replies.