# Open My Account on the Orders Page

> Sends customers straight to their order list when they open My Account and removes the mostly empty Dashboard tab.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, my-account, orders, navigation
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-account-open-on-orders/

## Code

```php
$wpide_account_landing = 'orders'; // Endpoint to open.

add_filter( 'woocommerce_account_menu_items', function ( $items ) {
    unset( $items['dashboard'] );

    return $items;
} );

add_action( 'template_redirect', function () use ( $wpide_account_landing ) {
    if ( ! is_user_logged_in() || ! is_account_page() || is_wc_endpoint_url() ) {
        return;
    }

    global $wp;

    if ( empty( $wp->query_vars ) || array_intersect_key( $wp->query_vars, array_flip( array( 'pagename', 'page_id', 'page' ) ) ) === $wp->query_vars ) {
        wp_safe_redirect( wc_get_account_endpoint_url( $wpide_account_landing ) );
        exit;
    }
} );
```

## Notes

Change 'orders' to another endpoint, such as 'downloads' or 'edit-account', to land there instead.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Open My Account on the Orders Page" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
