• Resolved tanino11

    (@tanino11)


    Hello, I need to hide the black box “payment” and “cancel order” from the customer panel (see image). I have a multivendor marrketplace and this is a simulated situation.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @tanino11

    Thanks for reaching out!

    I understand that you want to hide the Payment and Cancel Order buttons under the My Accounts page, is that correct?

    These buttons are automatically shown for orders having the status: Pending Payment.

    I believe this could be handled via custom CSS, but I just want to make sure of your end goal here or what are you trying to achieve so that we could point you in the right direction.

    Thanks!

    Thread Starter tanino11

    (@tanino11)

    Yes, that’s right! I want to hide them.

    Thanks for reply

    Hi @tanino11

    Thanks for providing more context to your inquiry here.

    I did some research and found the code below from this thread worked on my site:

    add_filter('woocommerce_my_account_my_orders_actions', 'remove_myaccount_orders_cancel_button', 10, 2);
    function remove_myaccount_orders_cancel_button( $actions, $order ){
        unset($actions['cancel']);
    
        return $actions;
    }

    You could also add unset($actions['cancel']); to hide the Pay button.

    Output:

    Image Link: https://snipboard.io/qaG6xS.jpg

    Hope this helps!

    It works! Thank you!

    You’re welcome! @ddvillavicencio I’m glad to hear that the issue has been resolved. If you require any further assistance or have any additional questions in the future, please feel free to create a new ticket, and we’ll be happy to help you out.

    Have a great day!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove payment and cancel order my account page’ is closed to new replies.