<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mahmudul Hasan Shaon</title>
    <description>The latest articles on DEV Community by Mahmudul Hasan Shaon (@shaonpro).</description>
    <link>https://dev.to/shaonpro</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F636182%2F1b5df221-897e-42fa-897c-158e7112d3c3.jpg</url>
      <title>DEV Community: Mahmudul Hasan Shaon</title>
      <link>https://dev.to/shaonpro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shaonpro"/>
    <language>en</language>
    <item>
      <title>How To Remove Download Tab From Woocommerce My Account Page</title>
      <dc:creator>Mahmudul Hasan Shaon</dc:creator>
      <pubDate>Fri, 11 Feb 2022 16:38:27 +0000</pubDate>
      <link>https://dev.to/shaonpro/how-to-remove-download-tab-from-woocommerce-my-account-page-52a8</link>
      <guid>https://dev.to/shaonpro/how-to-remove-download-tab-from-woocommerce-my-account-page-52a8</guid>
      <description>&lt;p&gt;Hello there,&lt;br&gt;
Today we will discuss &lt;strong&gt;HOW&lt;/strong&gt; and &lt;strong&gt;WHY&lt;/strong&gt; we need to remove Download Button from WooCommerce MyAccount Page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnx9pg0rebw3opvfn6zv9.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnx9pg0rebw3opvfn6zv9.jpeg" alt="Removing Download Button Codes" width="800" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Imagine you have a WordPress website along with Woocommerce. You are selling physical products like digital goods or clothing there. When customers access their account page, they see a layout that looks like the general layout of the WooCommerce account page. &lt;br&gt;
It's normal, right? But for regular users, this layout must be optimized, right? So, they can understand their panel better. &lt;/p&gt;

&lt;p&gt;If you don't have any digital products in your store, that "Download Button" or "Download Section" does not make any sense. In some cases, it can also be confusing too.&lt;/p&gt;

&lt;p&gt;Considering that, we need to remove that button. &lt;br&gt;
&lt;strong&gt;How can we do that? &lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's say we can do that by using CSS! Easy Peasy&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.woocommerce-MyAccount-navigation-link.woocommerce-MyAccount-navigation-link--downloads{

display: none;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yes, you can do that, but that's not right and not the solution we are looking for. &lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution - Our Solution 😎
&lt;/h2&gt;

&lt;p&gt;Use these codes in your function.php file to remove the downloads tab from the WooCommerce MyAccount page.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://github.com/ShaonPro/Remove-The-Downloads-Tab-on-The-My-Account-Page-Woocommerce" rel="noopener noreferrer"&gt;Check The GitHub Hack Repo Link&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
add_filter( 'woocommerce_account_menu_items', 'ShaonPro_remove_downloads_tab_my_account', 999 );

function ShaonPro_remove_downloads_tab_my_account( $items ) {
// You can add other tab names
unset($items['downloads']);
return $items;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Here's the regular MyAccount Page with the Download Button before applying any code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq7u178j9u5k8aml8b3wc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq7u178j9u5k8aml8b3wc.png" alt="With Download Button" width="800" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;After applying the code, MyAccount Page with no download button.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmooxj659j30xpxjkqvyi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmooxj659j30xpxjkqvyi.png" alt="Without Download Button" width="800" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are good to go now 😇 - Thanks for your support. &lt;/p&gt;

</description>
      <category>woocommerce</category>
      <category>wordpress</category>
      <category>remove</category>
      <category>download</category>
    </item>
  </channel>
</rss>
