Remove WooCommerce Download section from navigation

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.

Hier klicken, um den Beitrag zu bewerten
[Gesamt: 0 Durchschnitt: 0]

Leave A Comment

Title