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:
orders | Orders |
downloads | Downloads |
edit-address | Adress |
payment-methods | Payment Methods |
edit-account | Konto-Details |
customer-logout | Logout |
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.
Comments