By default on WooCommerce My Account page has Downloads tab. Ecommerce websites that sell physical products do not need this tab. And if you are an owner of such an online store you might want to remove the downloads tab from that page.
There are several steps we need to follow to accomplish this task.
Step 1: Determine the Active Theme Name
Navigate to your website’s Dashboard ⟶ Appearance ⟶ Themes to see the active theme.
You just saw the active theme. For example, the theme name is Genesis.
Step 2: Install a File Manager Plugin
There is a WordPress plugin called WP File Manager. We install this plugin to reach out to the file where we insert the code snippet.
Now, you go to Plugins ⟶ Add New. Type that plugin name in the search field, it will appear in a moment. Click on Install Now and then on Active.
The plugin is now installed.
Step 3: Open the Functions File
The theme your website is used has a file called functions.php. We now look for this file.
Go to WP File Manager ⟶ wp-content ⟶ themes ⟶ genesis ⟶ functions.php
Remember in your case the theme would be different and so instead of genesis, there will be something else.
Now, right-click on the functions.php and select the Code Editor option.
Step 4: Copy-Paste the Code Snippet
Copy the following code and paste it underneath of all code in the functions.php file.
Save and close the file and refresh your WooCommerce My Account page.
/** * Remove Downloads Tab Woocommerce My Accout. */ add_filter( 'woocommerce_account_menu_items', 'custom_remove_downloads_my_account', 999 ); function custom_remove_downloads_my_account( $items ) { unset($items['downloads']); return $items; }
Wallah! The Downloads tab is now removed from that page.
Conclusion
In just 4 steps we remove the Downloads tab. If you find any issue and this tutorial does not resolve your problem comment below. Or if you are not tech-savvy contact us to hire and get it fixed.