How to remove any link from My Account menu in woocommerce with code

add_filter ( 'woocommerce_account_menu_items', 'amit_customize_account_menu_items' );
function amit_customize_account_menu_items( $menu_items ){
 
    //unset( $menu_items['dashboard'] ); // Remove Dashboard from My Account Menu
    //unset( $menu_items['orders'] ); // Remove Orders from My Account Menu
    unset( $menu_items['downloads'] ); // Remove Downloads from My Account Menu
    //unset( $menu_items['edit-account'] ); // Remove Account details from My Account Menu
    unset( $menu_items['payment-methods'] ); // Remove Payment Methods from My Account Menu
    //unset( $menu_items['edit-address'] ); // Addresses from My Account Menu
    //unset( $menu_items['customer-logout'] ); // Remove Logout link from My Account Menu
return $menu_items;
 
} 

Share this post:

Share on facebook
Share on twitter
Share on linkedin
Share on email
Amitpal Singh
Amitpal Singh
Freelance website and application developer. Working from Sangrur Punjab in India.
Follow Amitpal on:

Register

Create your account and post ad