Remove WooCommerce Download section from navigation

Marc Wagner, July 22, 2022

If you are not offering virtual products, it is recommended to disable the download section in the customer’s account view.

This can be done easily without a plugin. All you have to do is add the following code to your theme’s Functions.php.

/**
 * Remove WooCommerce Download Section
 */
function removeWooCommerceDownloadSection($items) {
   unset( $items['downloads'] );
   return $items;
}
add_filter('woocommerce_account_menu_items', 'removeWooCommerceDownloadSection', 10, 1);

Now, the link to the download section will no longer be displayed. Of course, you can set this for the other WooCommerce links as well. The following endpoints are automatically offered by WooCommerce:

ordersOrders
downloadsDownloads
edit-addressAdress
payment-methodsPayment Methods
edit-accountKonto-Details
customer-logoutLogout

If you found this article interesting, we would be happy to receive your comments. If you have any questions, please feel free to contact us in the forum.

Avatar of Marc Wagner
Marc Wagner

Hi Marc here. I'm the founder of Forge12 Interactive and have been passionate about building websites, online stores, applications and SaaS solutions for businesses for over 20 years. Before founding the company, I already worked in publicly listed companies and acquired all kinds of knowledge. Now I want to pass this knowledge on to my customers.

Similar Topics

Comments

Leave A Comment

Title