Back to Community

How to Remove the 'View Order' Button from WooCommerce Order Confirmation Pages

18 threads Sep 7, 2025 PluginWoocommerce

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