• Resolved waci851031

    (@waci851031)


    hi,all…

    click here.Is anyone know how to show woocommerce order detail on customer page?
    For now, when I click view order(the button in red frame), it just refresh the page and show the same page.

    Below is function.php which I add to show my order list on customer page.(and I use the shortcode[woocommerce_orders])
    function woocommerce_orders() {
    $user_id = get_current_user_id();
    if ($user_id == 0) {
    return do_shortcode(‘[woocommerce_my_account]’);
    }else{
    ob_start();
    wc_get_template( ‘myaccount/my-orders.php’, array(
    ‘current_user’ => get_user_by( ‘id’, $user_id),
    ‘order_count’ => $order_count) );
    return ob_get_clean();}}
    add_shortcode(‘woocommerce_orders’, ‘woocommerce_orders’)`

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @waci851031,

    The link you shared isn’t accessible.

    However, by default, WooCommerce adds a “Orders” menu to the My Account page that shows all the customer’s orders: https://d.pr/i/hqoYX8

    If you’re not seeing it, it’d have been overridden by your theme. Can you try testing with a default theme such as Storefront or Twenty Twenty?

    Let me know what you find.

    Hi @waci851031

    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.

    Thread Starter waci851031

    (@waci851031)

    Hi, @sukafia !
    I don’t use the default my account theme from woocommerce. I create the new one~
    So I use the shortcode [woocommerce_orders] in my page.
    It shows the order list and the view order button.
    When I click the button, it shows nothing…

    Mirko P.

    (@rainfallnixfig)

    Hi @sukafia,

    It looks like you have a custom “My Account” page as you’re not using the default one which WooCommerce creates, and you’re also using a custom shortcode.

    Note that this forum support does not cover code-related questions, so I’d suggest you reach out to a developer or a customization expert listed at https://woocommerce.com/customizations/ who can assist you with getting this sorted.

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘order-detail’ is closed to new replies.