How to Remove the 'View Order' Button from WooCommerce Order Confirmation Pages
Content
Many store owners who use guest checkout have recently reported a new "View Order" button appearing on their WooCommerce order confirmation (thank you) pages. This button can be confusing for guests, as it often leads to a login page instead of a useful order summary. This article explains why this happens and provides the most effective methods to remove it.
Why the 'View Order' Button Appears
Based on community reports, this button was introduced in a recent WooCommerce update. Its intended purpose is to allow registered customers to easily access their order details from their account. However, for stores that primarily or exclusively use guest checkout, this button serves no purpose and can create a poor user experience by directing customers to a login page they cannot use.
Common Solutions to Remove the Button
1. Wait for the Official Fix
Evidence from the WooCommerce GitHub repository indicates the development team has acknowledged this as an issue. A fix is expected in an upcoming release (version 9.8.0 or later). If you can wait, simply updating WooCommerce when the new version is available may resolve the problem automatically.
2. Use a Code Snippet (Recommended)
The most reliable way to remove the button immediately is by adding a small code snippet to your theme's functions.php file or a site-specific plugin.
// Remove View Order button from Order Confirmation page
add_filter( 'woocommerce_order_details_after_order_table', 'remove_view_order_button_for_guests' );
function remove_view_order_button_for_guests( $order ) {
if ( ! $order->get_customer_id() ) {
remove_action( 'woocommerce_order_details_after_order_table', 'woocommerce_order_details_view_order', 10 );
}
}
Important: Always use a child theme when editing theme files to prevent your changes from being overwritten by future updates. If you are not comfortable adding code, consider seeking assistance from a developer.
3. Use CSS (Temporary Workaround)
If adding code is not an option, you can hide the button using CSS. This doesn't remove the button from the code but makes it invisible to visitors. Add the following to your theme's Customizer under Additional CSS.
.order-actions {
display: none !important;
}
Please note: This is a visual fix only and may need to be adjusted if your theme uses different CSS classes.
Conclusion
The unexpected "View Order" button is a known issue affecting stores with guest checkout. While an official fix is in development, you can use the provided code snippet for a clean removal or CSS for a quick visual fix. Always test any changes on a staging site before applying them to your live store.
Related Support Threads Support
-
Login,Register and My Accounthttps://wordpress.org/support/topic/loginregister-and-my-account/
-
automatically generate a passwordhttps://wordpress.org/support/topic/automatically-generate-a-password/
-
Cart json iconhttps://wordpress.org/support/topic/cart-json-icon/
-
My place order button redirects to page not found.I have tried fixing it in vainhttps://wordpress.org/support/topic/my-place-order-button-redirects-to-page-not-found-i-have-tried-fixing-it-in-vain/
-
No action when click PLACE ORDER button at Checkout Pagehttps://wordpress.org/support/topic/no-action-when-click-place-order-button-at-checkout-page/
-
Product Review Options aren’t availablehttps://wordpress.org/support/topic/product-review-options-arent-available/
-
Show/Hide password button label not visiblehttps://wordpress.org/support/topic/show-hide-password-button-label-not-visible/
-
Site Visibilityhttps://wordpress.org/support/topic/site-visibility-3/
-
Help with the order dashboard missing fields pleasehttps://wordpress.org/support/topic/help-with-the-order-dashboard-missing-fields-please/
-
“Add Products” button on “New Order” page does not appear.https://wordpress.org/support/topic/add-products-button-on-new-order-page-does-not-appear/
-
Custom Fields Option Missinghttps://wordpress.org/support/topic/custom-fields-option-missing-2/
-
Buy Now Buttonhttps://wordpress.org/support/topic/buy-now-button-26/
-
Remove View Order Button on Order Confirmation Pagehttps://wordpress.org/support/topic/remove-view-order-button-on-order-confirmation-page/
-
Thank You Page – Actions BTNhttps://wordpress.org/support/topic/thank-you-page-actions-btn/
-
How can I add “Refund” button for customers to request refund?https://wordpress.org/support/topic/how-can-i-add-refund-button-for-customers-to-request-refund-2/
-
Reset password and Save button disablehttps://wordpress.org/support/topic/reset-password-and-save-button-disable/
-
Remove View Order Button on Order Confirmation Pagehttps://wordpress.org/support/topic/remove-view-order-button-on-order-confirmation-page-2/
-
View Order Button on Order Confirmation Pagehttps://wordpress.org/support/topic/view-order-button-on-order-confirmation-page/